Skip to content

Commit 01cd3c5

Browse files
author
Christoph Schläpfer
committed
Fixed linting issues
1 parent 870fe18 commit 01cd3c5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

bin/v-add-sys-snappymail

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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"

bin/v-delete-sys-snappymail

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ fi
5050

5151
# Get current version
5252
if [ -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
5757
fi
5858

5959
# Perform verification if read-only mode is enabled
@@ -68,16 +68,16 @@ rm -f -r $SM_CONFIG_DIR
6868
rm ~/.snappymail
6969

7070
if [ -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"
7373
else
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"
7676
fi
7777
# Updating hestia.conf
7878
if [ -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')"
8181
fi
8282

8383
#----------------------------------------------------------#

0 commit comments

Comments
 (0)