File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -5993,6 +5993,7 @@ installcronjob() {
59935993 fi
59945994 _t=$( _time)
59955995 random_minute=$( _math $_t % 60)
5996+ random_hour=$( _math $_t / 60 % 24)
59965997
59975998 if ! _exists " $_CRONTAB " && _exists " fcrontab" ; then
59985999 _CRONTAB=" fcrontab"
@@ -6017,16 +6018,14 @@ installcronjob() {
60176018 _info " Installing cron job"
60186019 if ! $_CRONTAB -l | grep " $PROJECT_ENTRY --cron" ; then
60196020 if _exists uname && uname -a | grep SunOS > /dev/null; then
6020- $_CRONTAB -l | {
6021- cat
6022- echo " $random_minute 0 * * * $lesh --cron --home \" $LE_WORKING_DIR \" $_c_entry > /dev/null"
6023- } | $_CRONTAB --
6021+ _CRONTAB_STDIN=" $_CRONTAB --"
60246022 else
6025- $_CRONTAB -l | {
6026- cat
6027- echo " $random_minute 0 * * * $lesh --cron --home \" $LE_WORKING_DIR \" $_c_entry > /dev/null"
6028- } | $_CRONTAB -
6023+ _CRONTAB_STDIN=" $_CRONTAB -"
60296024 fi
6025+ $_CRONTAB -l | {
6026+ cat
6027+ echo " $random_minute $random_hour * * * $lesh --cron --home \" $LE_WORKING_DIR \" $_c_entry > /dev/null"
6028+ } | $_CRONTAB_STDIN
60306029 fi
60316030 if [ " $? " != " 0" ]; then
60326031 _err " Install cron job failed. You need to manually renew your certs."
You can’t perform that action at this time.
0 commit comments