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