Zhang Huangbin avatar Zhang Huangbin committed 966e134

Code cleanup: track BACKEND to help improve iRedMail.

Comments (0)

Files changed (3)

iRedMail/conf/global

 # Location of sshd_config
 export SSHD_CONFIG='/etc/ssh/sshd_config'
 
-# MySQL databases which need to be backed up.
+# SQL databases which need to be backed up.
 export BACKUP_DATABASES=''
+
+# Command use to fetch source tarballs.
+if [ X"${DISTRO}" == X"FREEBSD" ]; then
+    # -i: Turns off interactive prompting during multiple file transfers.
+    # -V: Disable verbose and progress
+    FETCH_CMD='ftp -iV'
+else
+    # -c: Continue getting a partially-downloaded file.
+    # -q: Turn off Wget's output.
+    FETCH_CMD="wget -cq"
+fi
+

iRedMail/functions/packages.sh

 
     export ALL_PKGS ENABLED_SERVICES
 
+    track_iredmail_info()
+    {
+        # Help track basic information, used to help iRedMail team understand
+        # which Linux/BSD distribution we should take more care of.
+        # iRedMail version number, OS distribution, release version, code name, backend.
+        ${FETCH_CMD} "http://iredmail.org/version/check.py/iredmail_os?iredmail_version=${PROG_VERSION}&arch=${ARCH}&distro=${DISTRO}&distro_version=${DISTRO_VERSION}&distro_code_name=${DISTRO_CODENAME}&backend=${BACKEND}" &>/dev/null
+
+        rm -f iredmail_os* &>/dev/null
+        echo 'export status_track_iredmail_info="DONE"' >> ${STATUS_FILE}
+    }
+
     # Install all packages.
     install_all_pkgs()
     {

iRedMail/pkgs/get_all.sh

 check_user root
 check_hostname
 
-if [ X"${DISTRO}" == X"FREEBSD" ]; then
-    # -i: Turns off interactive prompting during multiple file transfers.
-    # -V: Disable verbose and progress
-    FETCH_CMD='ftp -iV'
-else
-    # -c: Continue getting a partially-downloaded file.
-    # -q: Turn off Wget's output.
-    # --referer: Include 'Referer: url' header in HTTP request.
-    FETCH_CMD="wget -cq"
-fi
-
 #
 # Mirror site.
 # Site directory structure:
     # Fetch all misc packages.
     cd ${MISC_DIR}
 
-    # Help track basic information, used to help iRedMail team understand
-    # which Linux/BSD distribution we should take more care of.
-    # iRedMail version number, OS distribution, release version, code name.
-    ${FETCH_CMD} "http://iredmail.org/version/check.py/iredmail_os?iredmail_version=${PROG_VERSION}&arch=${ARCH}&distro=${DISTRO}&distro_version=${DISTRO_VERSION}&distro_code_name=${DISTRO_CODENAME}" &>/dev/null
-
-    rm -f iredmail_os* &>/dev/null
-
     misc_total=$(( $(echo ${MISCLIST} | wc -w | awk '{print $1}') ))
     misc_count=1
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.