diff options
| author | Joe Carstairs <me@joeac.net> | 2026-07-02 09:39:10 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-07-02 09:39:10 +0100 |
| commit | 5bd502c72f79ebfb466c8378e48138596ff453fb (patch) | |
| tree | 2034eb6b7f48c4dd07183d10579324bb0578bbee | |
| parent | f39c4a51ddc101db462cf64cbee14a351d911cc7 (diff) | |
better crontab with update.sh
| -rw-r--r-- | make/crontab.mk | 8 | ||||
| -rw-r--r-- | update.sh | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/make/crontab.mk b/make/crontab.mk index aab3285..8d801a9 100644 --- a/make/crontab.mk +++ b/make/crontab.mk @@ -8,10 +8,6 @@ reinstall_crontab: /etc/periodic/daily/joeac.net uninstall_crontab: sudo rm -f /etc/periodic/daily/joeac.net -/etc/periodic/daily/joeac.net: - echo "#!/bin/sh" > crontab.tmp - echo "git -C /usr/local/lib/joeac.net pull && $(MAKE) --directory /usr/local/lib/joeac.net && rc-service joeac.net restart" \ - >> crontab.tmp - sudo mv crontab.tmp /etc/periodic/daily/joeac.net +/etc/periodic/daily/joeac.net: update.sh + sudo cp update.sh /etc/periodic/daily/joeac.net sudo chmod +x /etc/periodic/daily/joeac.net - diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..52a3276 --- /dev/null +++ b/update.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cd /usr/local/lib/joeac.net \ + && git pull \ + && make \ + && make reinstall |
