Created
April 4, 2011 18:14
-
-
Save stucchio/902108 to your computer and use it in GitHub Desktop.
A script to run elephantdb as a daemon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if test -s /var/run/hadoop/elephantdb.pid; | |
then | |
OLDPID=`cat /var/run/hadoop/elephantdb.pid` | |
echo "Killing old elephant process, pid=$OLDPID" | |
kill $OLDPID | |
rm /var/run/hadoop/elephantdb.pid | |
fi; | |
nohup java elephantdb.main /elephant/global-conf.clj /usr/local/hadoop/conf/elephantdb-local-conf.clj "`date`" > /var/log/hadoop/elephantdb.log & | |
echo $! > /var/run/hadoop/elephantdb.pid | |
echo "Started elephantdb, pid=$!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment