Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
0c8870cb
Unverified
Commit
0c8870cb
authored
Sep 13, 2023
by
neil
Committed by
GitHub
Sep 13, 2023
Browse files
Merge pull request #944 from MarcelWaldvogel/random-cron
Random cron
parents
1a90f66f
92dbe6cd
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
0c8870cb
...
...
@@ -5993,6 +5993,7 @@ installcronjob() {
fi
_t=$(_time)
random_minute=$(_math $_t % 60)
random_hour=$(_math $_t / 60 % 24)
if ! _exists "$_CRONTAB" && _exists "fcrontab"; then
_CRONTAB="fcrontab"
...
...
@@ -6017,16 +6018,14 @@ installcronjob() {
_info "Installing cron job"
if ! $_CRONTAB -l | grep "$PROJECT_ENTRY --cron"; then
if _exists uname && uname -a | grep SunOS >/dev/null; then
$_CRONTAB
-l
|
{
cat
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
$_c_entry
> /dev/null"
}
|
$_CRONTAB
--
_CRONTAB_STDIN="$_CRONTAB --"
else
_CRONTAB_STDIN="$_CRONTAB -"
fi
$_CRONTAB -l | {
cat
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
$_c_entry
> /dev/null"
}
|
$_CRONTAB
-
fi
echo "$random_minute $random_hour * * * $lesh --cron --home \"$LE_WORKING_DIR\" $_c_entry> /dev/null"
} | $_CRONTAB_STDIN
fi
if [ "$?" != "0" ]; then
_err "Install cron job failed. You need to manually renew your certs."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment