File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ if [ "$UPDATE" == "no" ]; then
9292 exit 2
9393 fi
9494
95-
9695 key=$( openssl rand -hex 4)
9796 suffix=$( openssl rand -hex 4)
9897 admin_account=" admin_$key "
@@ -112,7 +111,7 @@ if [ "$UPDATE" == "no" ]; then
112111 # Create cache folder and set permissions
113112 mkdir -p " $SM_CONFIG_DIR /data/_data_/_default_/cache/"
114113 chown -R www-data:www-data ./data
115-
114+
116115 if [ -f ' /usr/bin/mariadb' ]; then
117116 mariadb -e " CREATE DATABASE snappymail" 2>&1
118117 r=$( generate_password)
@@ -123,7 +122,7 @@ if [ "$UPDATE" == "no" ]; then
123122 r=$( generate_password)
124123 mysql -e " GRANT ALL ON snappymail.*
125124 TO snappymail@localhost IDENTIFIED BY '$r '"
126- fi
125+ fi
127126 # Temporarily set the permissions to www-data
128127 chown -R www-data:www-data $SM_CONFIG_DIR /
129128 php -f $HESTIA_COMMON_DIR /snappymail/install.php " admin_$suffix " " admin_$key " " $admin_password " " $r " " $BACKEND_PORT "
Original file line number Diff line number Diff line change 5050
5151# Get current version
5252if [ -f " /var/lib/snappymail/data/VERSION" ]; then
53- version=$( cat /var/lib/snappymail/data/VERSION)
54- else
55- echo " Error: SnappyMail is not installed"
56- exit 2
53+ version=$( cat /var/lib/snappymail/data/VERSION)
54+ else
55+ echo " Error: SnappyMail is not installed"
56+ exit 2
5757fi
5858
5959# Perform verification if read-only mode is enabled
@@ -68,16 +68,16 @@ rm -f -r $SM_CONFIG_DIR
6868rm ~ /.snappymail
6969
7070if [ -f ' /usr/bin/mariadb' ]; then
71- mariadb -e " DROP DATABASE snappymail" 2>&1
72- mariadb -e " DROP USER snappymail@localhost"
71+ mariadb -e " DROP DATABASE snappymail" 2>&1
72+ mariadb -e " DROP USER snappymail@localhost"
7373else
74- mysql -e " DROP DATABASE snappymail" 2>&1
75- mysql -e " DROP USER snappymail@localhost"
74+ mysql -e " DROP DATABASE snappymail" 2>&1
75+ mysql -e " DROP USER snappymail@localhost"
7676fi
7777# Updating hestia.conf
7878if [ -z " $( echo " $WEBMAIL_SYSTEM " | grep -w ' snappymail' ) " ]; then
79- # remove snappymail from webmail list and make sure the string doesn't start with a comma
80- $BIN /v-change-sys-config-value ' WEBMAIL_SYSTEM' " $( echo " $WEBMAIL_SYSTEM " | sed " s/snappymail//g" | sed ' s/^,//g' ) "
79+ # remove snappymail from webmail list and make sure the string doesn't start with a comma
80+ $BIN /v-change-sys-config-value ' WEBMAIL_SYSTEM' " $( echo " $WEBMAIL_SYSTEM " | sed " s/snappymail//g" | sed ' s/^,//g' ) "
8181fi
8282
8383# ----------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments