Skip to content

Commit

Permalink
Simplify and clarify SunOS crontab differences
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelWaldvogel committed Oct 12, 2020
1 parent 0781e8c commit 92dbe6c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5615,16 +5615,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 $random_hour * * * $lesh --cron --home \"$LE_WORKING_DIR\" $_c_entry> /dev/null"
} | $_CRONTAB --
_CRONTAB_STDIN="$_CRONTAB --"
else
$_CRONTAB -l | {
cat
echo "$random_minute $random_hour * * * $lesh --cron --home \"$LE_WORKING_DIR\" $_c_entry> /dev/null"
} | $_CRONTAB -
_CRONTAB_STDIN="$_CRONTAB -"
fi
$_CRONTAB -l | {
cat
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."
Expand Down

0 comments on commit 92dbe6c

Please sign in to comment.