File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 5656 sed -i " s/${module} _KEY=.*/${module} _KEY='$license '/g" $VESTA /conf/vesta.conf
5757fi
5858
59+ # Activating sftpjail
60+ if [ " $module " = ' SFTPJAIL' ]; then
61+ setsid $BIN /v-add-sys-sftp-jail 2> /dev/null
62+ fi
63+
5964# Logging
6065log_event " $OK " " $EVENT "
6166
Original file line number Diff line number Diff line change @@ -42,11 +42,15 @@ for str in $modules; do
4242 license=$( echo " $str " | cut -f 2 -d \' )
4343 if [ ! -z " $license " ]; then
4444 v_host=' https://vestacp.com/checkout'
45- answer=$( curl -s $v_host /check.php? licence_key=$license )
45+ answer=$( curl -s " $v_host /check.php?licence_key=$license &module= $module " )
4646 check_result $? " cant' connect to vestacp.com " 0
47+ echo " $module $license $answer "
4748 if [[ " $answer " != ' 0' ]]; then
48- sed -i " s/${module} _KEY=.*/${module} _KEY=''/g" $VESTA /conf/vesta.conf
49- echo " deactivating $module "
49+ if [ " $module " = ' SFTPJAIL' ]; then
50+ setsid $BIN /v-delete-sys-sftp-jail 2> /dev/null
51+ fi
52+ sed -i " s/${module} _KEY=.*/${module} _KEY=''/g" \
53+ $VESTA /conf/vesta.conf
5054 fi
5155 fi
5256done
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ check_args '2' "$#" 'MODULE LICENSE'
3737v_host=' https://vestacp.com/checkout'
3838answer=$( curl -s $v_host /cancel.php? licence_key=$license )
3939check_result $? " cant' connect to vestacp.com " $E_CONNECT
40- echo $answer
4140
4241# Checking server answer
4342if [[ " $answer " != ' 0' ]]; then
@@ -55,6 +54,11 @@ if [ ! -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then
5554 sed -i " s/${module} _KEY=.*/${module} _KEY=''/g" $VESTA /conf/vesta.conf
5655fi
5756
57+ # Deactivating sftpjail
58+ if [ " $module " = ' SFTPJAIL' ]; then
59+ setsid $BIN /v-delete-sys-sftp-jail 2> /dev/null
60+ fi
61+
5862# Logging
5963log_event " $OK " " $EVENT "
6064
You can’t perform that action at this time.
0 commit comments