Skip to content

Commit 4425831

Browse files
Check for Roundcube before changing backend port
Adds condition to check for Roundcube installation prior to changing backend port for database driver; without this sed throws an error during clean installation and when running the script manually.
1 parent c00edb6 commit 4425831

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bin/v-change-sys-port

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ if [ "$ORIGINAL_PORT" = "$PORT" ]; then
7272
else
7373
# Replace port in config files.
7474
sed -i "/listen/c\ listen $PORT ssl;" $HESTIA/nginx/conf/nginx.conf
75-
sed -i "/password_hestia_port/c\$rcmail_config['password_hestia_port'] = '$PORT';" /etc/roundcube/plugins/password/config.inc.php
75+
if [ -d /etc/roundcube/ ]; then
76+
sed -i "/password_hestia_port/c\$rcmail_config['password_hestia_port'] = '$PORT';" /etc/roundcube/plugins/password/config.inc.php
77+
fi
7678
sed -i "/COMMENT='HESTIA'/c\RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='$PORT' IP='0.0.0.0/0' COMMENT='HESTIA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'" $HESTIA/data/firewall/rules.conf
7779

7880
# Restart services

0 commit comments

Comments
 (0)