myvesta/bin/v-delete-vesta-softaculous
2018-01-02 16:39:05 +02:00

49 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# info: delete vesta softaculous
# options: NONE
#
# The script disables softaculous plugin
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
if [ "$SOFTACULOUS" = 'no' ] || [ -z "$SOFTACULOUS" ]; then
exit
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Deleting symlink
if [ -e "$VESTA/web/softaculous" ]; then
mkdir -p $VESTA/disabled_plugins
mv $VESTA/web/softaculous $VESTA/disabled_plugins
fi
# Updating SOFTACULOUS value
sed -i "s/SOFTACULOUS.*/SOFTACULOUS='no'/g" \
$VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event "$OK" "$ARGUMENTS"
exit