summaryrefslogtreecommitdiffstats
path: root/hosts/logi1/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/logi1/postinst')
-rw-r--r--hosts/logi1/postinst16
1 files changed, 16 insertions, 0 deletions
diff --git a/hosts/logi1/postinst b/hosts/logi1/postinst
index fa0e1b8..9b9aaf3 100644
--- a/hosts/logi1/postinst
+++ b/hosts/logi1/postinst
@@ -249,6 +249,22 @@ cat >"${target}/home/pj/.claws-mail/folderlist.xml" <<-EOF
</folderlist>
EOF
+# Install master crontab and any dotfile crontabs.
+in_target sudo -u pj sh -c 'mkdir ~/.config/cron ~/.config/cron.reboot'
+cat >"${target}/home/pj/.config/cron/CRONTAB" <<-EOF
+ SHELL = /bin/sh
+ PATH = /home/pj/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+
+ # d m d
+ # o o o
+ #m h m n w command
+ @reboot run-parts --report ~/.config/cron.reboot
+ 0 * * * * run-parts --list ~/.config/cron | xargs cat | crontab -
+ EOF
+in_target chown pj:pj '/home/pj/.config/cron/CRONTAB'
+in_target sudo -u pj sh -c \
+ 'run-parts --list ~/.config/cron | xargs cat | crontab -'
+
# Generate target's SSH keypair.
rm -f "${target}/home/pj/.ssh/id_rsa" "${target}/home/pj/.ssh/id_rsa.pub" || \
return 1