-
-
Save kingster/7b688664776a8ce05969 to your computer and use it in GitHub Desktop.
APS Demon File
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/bash | |
# /etc/init.d/aps | |
# | |
# description: APE Daemon | |
# processname: APE Daemon | |
# author : me@kinshuk.in | |
# Define where ape is installed. | |
APE_DIRECTORY=/var/aps/APS-Deploy | |
start() { | |
echo -n "Starting APE... " | |
pushd $APE_DIRECTORY > /dev/null | |
$APE_DIRECTORY/start | |
popd > /dev/null | |
RETVAL=$? | |
} | |
stop() { | |
echo "Stopping APE..." | |
$APE_DIRECTORY/stop | |
} | |
debug() { | |
echo "Starting Debug APE..." | |
pushd $APE_DIRECTORY > /dev/null | |
$APE_DIRECTORY/debug | |
popd > /dev/null | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
start | |
;; | |
debug) | |
debug | |
;; | |
*) | |
echo "Usage: {start|stop|restart|debug}" | |
exit 1 | |
;; | |
esac | |
exit $RETVAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment