Skip to content

Instantly share code, notes, and snippets.

@jackdesert
Last active August 29, 2015 14:04
Show Gist options
  • Save jackdesert/ee1f0f1d8b866562c3d3 to your computer and use it in GitHub Desktop.
Save jackdesert/ee1f0f1d8b866562c3d3 to your computer and use it in GitHub Desktop.
Wrapper Script for taskd
#! /bin/bash
# this script is just a wrapper around taskd so that taskd
# will start up again immediately if it ever dies
#
# The proper way to invoke this script is to call
# `nohup script/run_taskd_indefinitely.sh &`
# Note that this script requires that $TASKDDATA is set
if [ -z "$TASKDDATA" ]; then
echo "ERROR: TASKDDATA not set"
exit 1
elif [ ! -d "$TASKDDATA" ]; then
echo "ERROR: TASKDDATA directory does not exist"
exit 1
else
echo "REMINDER: call this with 'nohup' and a trailing '&'"
fi
while true; do
/usr/local/bin/taskd server
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment