myvesta/bin/v-schedule-vesta-softaculous
2017-12-21 19:18:00 +02:00

47 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# info: adding cronjob for vesta-softaculous installation
# options: NONE
#
# The function adds cronjob for letsencrypt ssl certificate installation
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Adding cronjob for vesta-softaculous
cmd="sudo /usr/local/vesta/bin/v-add-vesta-softaculous"
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
$BIN/v-add-cron-job admin '*/1' '*' '*' '*' '*' "$cmd"
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event "$OK" "$ARGUMENTS"
exit