File tree Expand file tree Collapse file tree 2 files changed +47
-3
lines changed
Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: add letsencrypt cronjob
3+ # options: NONE
4+ #
5+ # The script for enabling letsencrypt cronjob
6+
7+
8+ # ----------------------------------------------------------#
9+ # Variable&Function #
10+ # ----------------------------------------------------------#
11+
12+ # Includes
13+ source $VESTA /func/main.sh
14+ source $VESTA /conf/vesta.conf
15+
16+
17+ # ----------------------------------------------------------#
18+ # Verifications #
19+ # ----------------------------------------------------------#
20+
21+ is_system_enabled " $CRON_SYSTEM " ' CRON_SYSTEM'
22+
23+
24+ # ----------------------------------------------------------#
25+ # Action #
26+ # ----------------------------------------------------------#
27+
28+ # Add cron job
29+ cmd=" sudo /usr/local/vesta/bin/v-update-sys-queue letsencrypt"
30+ check_cron=$( grep " $cmd " $VESTA /data/users/admin/cron.conf 2> /dev/null)
31+ if [ -z " $check_cron " ] && [ ! -z " $CRON_SYSTEM " ]; then
32+ $BIN /v-add-cron-job admin ' */5' ' *' ' *' ' *' ' *' " $cmd "
33+ fi
34+
35+
36+ # ----------------------------------------------------------#
37+ # Vesta #
38+ # ----------------------------------------------------------#
39+
40+ # Logging
41+ log_event " $OK " " $ARGUMENTS "
42+
43+ exit
Original file line number Diff line number Diff line change 4848
4949# Defining pipe functions
5050case $queue in
51- restart) bash $VESTA /data/queue/$queue .pipe ;;
51+ restart) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
5252 webstats) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
5353 backup) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
54- disk) bash $VESTA /data/queue/$queue .pipe ;;
55- traffic) bash $VESTA /data/queue/$queue .pipe ;;
54+ disk) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
55+ traffic) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
5656 dns-cluster) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
57+ letsencrypt) bash $VESTA /data/queue/$queue .pipe > /dev/null 2>&1 ;;
5758 * ) check_args ' 1' ' 0' ' QUEUE' ;;
5859esac
5960
You can’t perform that action at this time.
0 commit comments