Skip to content

Commit

Permalink
ns-api: fix auto-updates cron (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
filippocarletti committed May 3, 2024
1 parent 20f2cdd commit a96d8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ns-api/files/schedule-automatic-updates
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ timestamp=$2
cmd="sleep \$(( RANDOM % 18000 )); /bin/opkg list-upgradable | /usr/bin/cut -f 1 -d ' ' | /usr/bin/xargs -r opkg upgrade"

if [ "$action" == "add" ]; then
crontab -l | grep -q "$cmd" || echo "5 2 * * $cmd" >> /etc/crontabs/root
crontab -l | grep -q "$cmd" || echo "5 2 * * * $cmd" >> /etc/crontabs/root
elif [ "$action" == "remove" ]; then
crontab -l | grep -v "$cmd" | sort | uniq | crontab -
else
Expand Down

0 comments on commit a96d8cf

Please sign in to comment.