diff --git a/bin/v-activate-vesta-license b/bin/v-activate-vesta-license index d3796a982..4774e9288 100755 --- a/bin/v-activate-vesta-license +++ b/bin/v-activate-vesta-license @@ -56,6 +56,11 @@ else sed -i "s/${module}_KEY=.*/${module}_KEY='$license'/g" $VESTA/conf/vesta.conf fi +# Activating sftpjail +if [ "$module" = 'SFTPJAIL' ]; then + setsid $BIN/v-add-sys-sftp-jail 2>/dev/null +fi + # Logging log_event "$OK" "$EVENT" diff --git a/bin/v-check-vesta-license b/bin/v-check-vesta-license index 46aa40a7e..74dd8327f 100755 --- a/bin/v-check-vesta-license +++ b/bin/v-check-vesta-license @@ -42,11 +42,15 @@ for str in $modules; do license=$(echo "$str" |cut -f 2 -d \') if [ ! -z "$license" ]; then v_host='https://vestacp.com/checkout' - answer=$(curl -s $v_host/check.php?licence_key=$license) + answer=$(curl -s "$v_host/check.php?licence_key=$license&module=$module") check_result $? "cant' connect to vestacp.com " 0 + echo "$module $license $answer" if [[ "$answer" != '0' ]]; then - sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" $VESTA/conf/vesta.conf - echo "deactivating $module" + if [ "$module" = 'SFTPJAIL' ]; then + setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null + fi + sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" \ + $VESTA/conf/vesta.conf fi fi done diff --git a/bin/v-deactivate-vesta-license b/bin/v-deactivate-vesta-license index c460cda6e..4cbf0cc97 100755 --- a/bin/v-deactivate-vesta-license +++ b/bin/v-deactivate-vesta-license @@ -37,7 +37,6 @@ check_args '2' "$#" 'MODULE LICENSE' v_host='https://vestacp.com/checkout' answer=$(curl -s $v_host/cancel.php?licence_key=$license) check_result $? "cant' connect to vestacp.com " $E_CONNECT -echo $answer # Checking server answer if [[ "$answer" != '0' ]]; then @@ -55,6 +54,11 @@ if [ ! -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" $VESTA/conf/vesta.conf fi +# Deactivating sftpjail +if [ "$module" = 'SFTPJAIL' ]; then + setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null +fi + # Logging log_event "$OK" "$EVENT"