Created
July 26, 2014 15:48
-
-
Save CameronNemo/c337e99c091589e7a496 to your computer and use it in GitHub Desktop.
ArangoDB Upstart job
This file contains hidden or 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
description "ArangoDB - the multi-purpose NoSQL database" | |
start on filesystem and static-network-up | |
stop on runlevel [016] or unmounting-filesystem or deconfiguring-networking | |
respawn | |
env USER=arangodb | |
env GROUP=arangodb | |
env CONF=/etc/arangodb/arangod.conf | |
pre-start script | |
dirs="/var/log/arangodb /var/lib/arangodb /var/lib/arangodb-apps /var/run/arangodb" | |
install -o $USER -g $GROUP -d $dirs | |
chown -R $USER:$GROUP $dirs | |
/usr/sbin/arangod -c $CONF --uid $USER --gid $GROUP \ | |
--check-version --no-server || { | |
echo "Database version check failed." | |
echo "Maybe need to run arangod with the upgrade option?" | |
exit 2 | |
} | |
end script | |
exec /usr/sbin/arangod -c $CONF --uid $USER --gid $GROUP \ | |
--temp-path "/var/tmp/arangod" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment