Update v-change-vesta-port

This commit is contained in:
dpeca 2019-08-24 02:37:28 +02:00 committed by GitHub
commit 40739f3105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
#----------------------------------------------------------#
# Variable&Function #
# Variable & Verifications #
#----------------------------------------------------------#
whoami=$(whoami)
@ -19,6 +19,9 @@ if [ -z "$VESTA" ]; then
VESTA="/usr/local/vesta"
fi
# Includes
source $VESTA/func/main.sh
# Argument definition
port=$1
@ -33,6 +36,10 @@ else
oldport=`cat $VESTA/conf/port.conf`
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
sed -i "s|$oldport;|$port;|g" $VESTA/nginx/conf/nginx.conf
if [ -f "/etc/roundcube/plugins/password/config.inc.php" ]; then
sed -i "s|'$oldport'|'$port'|g" /etc/roundcube/plugins/password/config.inc.php