Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
50c9d178
Commit
50c9d178
authored
Jan 17, 2017
by
neil
Committed by
GitHub
Jan 17, 2017
Browse files
Merge pull request #547 from Neilpang/random
Random
parents
a8ab028b
0f21537f
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
50c9d178
...
@@ -3371,15 +3371,18 @@ installcronjob() {
...
@@ -3371,15 +3371,18 @@ installcronjob() {
_err
"Can not install cronjob,
$PROJECT_ENTRY
not found."
_err
"Can not install cronjob,
$PROJECT_ENTRY
not found."
return
1
return
1
fi
fi
_t
=
$(
_time
)
random_minute
=
$(
_math
$_t
% 60
)
if
_exists
uname
&&
uname
-a
|
grep
SunOS
>
/dev/null
;
then
if
_exists
uname
&&
uname
-a
|
grep
SunOS
>
/dev/null
;
then
crontab
-l
|
{
crontab
-l
|
{
cat
cat
echo
"
0
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
}
| crontab
--
}
| crontab
--
else
else
crontab
-l
|
{
crontab
-l
|
{
cat
cat
echo
"
0
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
}
| crontab -
}
| crontab -
fi
fi
fi
fi
...
...
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