From 8ce5b04f510333b5e8552d30e84276e08c29ecb2 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 15 Nov 2021 16:44:26 -0700 Subject: Install crontab w/ script This adds a couple of new scripts: install-crontab.sh and update.sh. The install-crontab script does exactly that -- it installs a new crontab that runs the update script every 5 minutes. An update script was added to simplify the crontab a bit and to ensure the Elixir update script is executed from the correct directory. --- install-crontab.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 install-crontab.sh (limited to 'install-crontab.sh') diff --git a/install-crontab.sh b/install-crontab.sh new file mode 100755 index 0000000..47c220c --- /dev/null +++ b/install-crontab.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Install crontab to run update script + +SCRIPT_DIR="$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" + +(crontab -l 2>/dev/null; echo "*/5 * * * * $SCRIPT_DIR/update.sh") | crontab - -- cgit v1.2.3