Skip to content

Commit f6438c4

Browse files
authored
Merge pull request #328 from linuxserver/abc-cron
Add abc crontab
2 parents ade05a7 + 72cb346 commit f6438c4

File tree

2 files changed

+13
-0
lines changed
  • root/etc
    • crontabs
    • s6-overlay/s6-rc.d/init-crontabs-config

2 files changed

+13
-0
lines changed

root/etc/crontabs/abc

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,18 @@ if [[ ! -f /config/crontabs/root ]]; then
1313
cp /etc/crontabs/root /config/crontabs/
1414
fi
1515

16+
# if abc crontabs do not exist in config
17+
# copy abc crontab from system
18+
if [[ ! -f /config/crontabs/abc ]] && crontab -l -u abc; then
19+
crontab -l -u abc >/config/crontabs/abc
20+
fi
21+
22+
# if abc crontabs still do not exist in config (were not copied from system)
23+
# copy abc crontab from included defaults
24+
if [[ ! -f /config/crontabs/abc ]]; then
25+
cp /etc/crontabs/abc /config/crontabs/
26+
fi
27+
1628
# import user crontabs
1729
crontab -u root /config/crontabs/root
30+
crontab -u abc /config/crontabs/abc

0 commit comments

Comments
 (0)