Zhang Huangbin avatar Zhang Huangbin committed 4648370

Mark extra/clear_iredmail.sh as deprecated.

Comments (0)

Files changed (1)

extra/clear_iredmail.sh

 
 # Source functions.
 . ${CONF_DIR}/global
-. ${CONF_DIR}/functions
 . ${CONF_DIR}/core
 
 # Source configurations.
     ALL_GROUPS="${ALL_GROUPS} ${IREDADMIN_HTTPD_GROUP}"
 }
 
+cat <<EOF
+This script is deprecated. To reinstall iRedMail,  please consider reinstalling
+server OS then reinstall iRedMail instead, this is the best way.
+
+================== WARNING =================
+This script will remove below data without addition confirm, please make sure
+you want to do this:
+
+- System accounts created by iRedMail. e.g. vmail, iredapd, iredadmin.
+- Binary packages installed by iRedMail. e.g. Apache, MySQL, Dovecot.
+- SQL database. e.g. MySQL database.
+- Config files and other directories/files created by installed software.
+================== WARNING =================
+EOF
+
+read -p "Do you really want to do this? Please type YES to continue. " confirm
+if [ X"${confirm}" != X'YES' ]; then
+    echo "Exit."
+    exit 255
+fi
+
 get_all_pkgs
 get_all_misc
 get_all_accounts
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.