mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
restart cron job
This commit is contained in:
parent
10f7097c48
commit
6365fe984d
5 changed files with 156 additions and 1 deletions
44
bin/v-delete-cron-restart-job
Executable file
44
bin/v-delete-cron-restart-job
Executable file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
# info: delete restart job
|
||||
# opions: NONE
|
||||
#
|
||||
# The script for disabling restart cron tasks
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Add cron job
|
||||
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue restart"
|
||||
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
|
||||
if [ ! -z "$check_cron" ]; then
|
||||
eval $check_cron
|
||||
$BIN/v-delete-cron-job admin "$JOB"
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Logging
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue