File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: rebuild cron job
3+
4+ # ----------------------------------------------------------#
5+ # Variable&Function #
6+ # ----------------------------------------------------------#
7+
8+ # Argument defenition
9+ user=" $1 "
10+
11+ # Importing variables
12+ source $VESTA /conf/vars.conf
13+ source $V_FUNC /shared_func.sh
14+ source $V_FUNC /cron_func.sh
15+
16+
17+ # ----------------------------------------------------------#
18+ # Verifications #
19+ # ----------------------------------------------------------#
20+
21+ # Checking arg number
22+ check_args ' 1' " $# " ' user'
23+
24+ # Checking argument format
25+ format_validation ' user'
26+
27+ # Checking cron system
28+ is_system_enabled ' cron'
29+
30+ # Checking user
31+ is_user_valid
32+
33+
34+ # ----------------------------------------------------------#
35+ # Action #
36+ # ----------------------------------------------------------#
37+
38+ # Rebuild cron jobs
39+ sync_cron_jobs
40+
41+
42+ # ----------------------------------------------------------#
43+ # Vesta #
44+ # ----------------------------------------------------------#
45+
46+ # Adding task to the vesta pipe
47+ restart_schedule ' cron'
48+
49+ # Logging
50+ log_event ' system' " $V_EVENT "
51+
52+ exit $OK
You can’t perform that action at this time.
0 commit comments