From 40739f3105e5f9cf930b13b346b0c5f663d59088 Mon Sep 17 00:00:00 2001 From: dpeca Date: Sat, 24 Aug 2019 02:37:28 +0200 Subject: [PATCH] Update v-change-vesta-port --- bin/v-change-vesta-port | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/v-change-vesta-port b/bin/v-change-vesta-port index 40d4dff7..be955013 100755 --- a/bin/v-change-vesta-port +++ b/bin/v-change-vesta-port @@ -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