cleanup
This commit is contained in:
parent
3d93d01cd1
commit
7665d702a2
22 changed files with 97 additions and 132 deletions
43
includes/gsp_agent.init
Normal file
43
includes/gsp_agent.init
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Generic Init script if we can't find what kind of Linux we're on
|
||||
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=GSP_USER
|
||||
|
||||
# Start function.
|
||||
start() {
|
||||
echo "Starting GSP Agent..."
|
||||
cd $agent_dir
|
||||
su -c "screen -d -m -t gsp_agent -c gsp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid" $agent_user &> $agent_dir/gsp_agent.svc &
|
||||
echo
|
||||
}
|
||||
|
||||
# Stop function.
|
||||
stop() {
|
||||
echo "Stopping GSP Agent..."
|
||||
kill `cat $agent_dir/gsp_agent_run.pid`
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: gsp_agent {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0;
|
||||
Loading…
Add table
Add a link
Reference in a new issue