Skip to content

Instantly share code, notes, and snippets.

@hnq90
Last active August 29, 2015 14:05
Show Gist options
  • Save hnq90/171b9f2188033eee5b60 to your computer and use it in GitHub Desktop.
Save hnq90/171b9f2188033eee5b60 to your computer and use it in GitHub Desktop.
Startup script for the Parry Server
#!/bin/bash
#
# parry-server Startup script for the Parry Server
#
# chkconfig: - 85 15
# description: PARRY Server Service
# author: HuyNQ <[email protected]>
# processname: parry-server
#
PARRY_HOME="parry-directory"
setup() {
cd $PARRY_HOME
./bin/parry setup
}
start(){
cd $PARRY_HOME
./bin/parry start
}
stop(){
cd $PARRY_HOME
./bin/parry stop
}
restart(){
cd $PARRY_HOME
./bin/parry restart
}
reset(){
cd $PARRY_HOME
./bin/parry reset
}
case "$1" in
setup)
setup
;;
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reset)
reset
;;
*)
echo "Usage: parry-server {setup|start|stop|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment