summaryrefslogtreecommitdiff
path: root/bin/loadcron
diff options
context:
space:
mode:
Diffstat (limited to 'bin/loadcron')
-rwxr-xr-xbin/loadcron50
1 files changed, 2 insertions, 48 deletions
diff --git a/bin/loadcron b/bin/loadcron
index 185ae8f2..b60ff123 100755
--- a/bin/loadcron
+++ b/bin/loadcron
@@ -1,51 +1,5 @@
#!/bin/sh
-# Load a crontab from ~/.config/cron. Replace "$HOME" with actual
-# homedir because cron can't deal with $HOME in crontabs
+# disabled on SDF cluster with its weird cron setup
-# This script was originally written by Joey Hess:
-# http://git.kitenet.net/?p=joey/home.git;a=blob;f=bin/loadcron
-
-set -e
-
-WARNING="# Automatically generated by loadcron; edit ~/.config/cron/ files instead."
-
-if [ ! -z "`crontab -l`" ] && ! crontab -l | grep -q "$WARNING"; then
- if [ "$1" != "-f" ]; then
- echo "loadcron: Current crontab was not generated by loadcron; not changing." >&2
- echo "loadcron: Use loadcron -f to override"
- exit 1
- else
- crontab -l > $HOME/tmp/oldcrontab
- echo "loadcron: Old crontab is backed up to $HOME/tmp/oldcrontab"
- fi
-fi
-
-tab=$HOME/.config/cron/$(whoami)_$(hostname -f)
-if [ -e "$tab" ]; then
- (
- echo "$WARNING"
- echo
- echo "# From $tab:"
- sed "s!\$HOME!$HOME!g" < "$tab"
- # anacron: disabled because I don't have any useful anacron
- # jobs on any hosts at present
- # hostanacrontab=$HOME/.config/anacron/$(whoami)_$(hostname -f)
- # mkdir -p $HOME/local/anacron/spool
- # if [ -e "$hostanacrontab" ]; then
- # echo "# Personal anacron:"
- # echo "0 8 * * * anacron -s -t $hostanacrontab -S $HOME/local/anacron/spool"
- # echo "@reboot anacron -s -t $hostanacrontab -S $HOME/local/anacron/spool"
- # echo
- # fi
- ) | crontab -
-else
- echo "loadcron: $tab does not exist, not loading" >&2
-fi
-
-# units=$HOME/.config/host-user-units/`hostname -f`
-# if [ -e "$units" ]; then
-# cat "$units" | while read unit; do
-# systemctl --user enable "$unit"
-# done
-# fi
+exit 0