mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 22:04:01 -07:00
cron rebuild function
This commit is contained in:
parent
3bcddb3d07
commit
8a5d155fb4
1 changed files with 52 additions and 0 deletions
52
bin/v_rebuild_sys_cron
Executable file
52
bin/v_rebuild_sys_cron
Executable file
|
@ -0,0 +1,52 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# info: rebuild cron job
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Variable&Function #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Argument defenition
|
||||||
|
user="$1"
|
||||||
|
|
||||||
|
# Importing variables
|
||||||
|
source $VESTA/conf/vars.conf
|
||||||
|
source $V_FUNC/shared_func.sh
|
||||||
|
source $V_FUNC/cron_func.sh
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Verifications #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Checking arg number
|
||||||
|
check_args '1' "$#" 'user'
|
||||||
|
|
||||||
|
# Checking argument format
|
||||||
|
format_validation 'user'
|
||||||
|
|
||||||
|
# Checking cron system
|
||||||
|
is_system_enabled 'cron'
|
||||||
|
|
||||||
|
# Checking user
|
||||||
|
is_user_valid
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Action #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Rebuild cron jobs
|
||||||
|
sync_cron_jobs
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Vesta #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Adding task to the vesta pipe
|
||||||
|
restart_schedule 'cron'
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
log_event 'system' "$V_EVENT"
|
||||||
|
|
||||||
|
exit $OK
|
Loading…
Add table
Add a link
Reference in a new issue