cleanup
This commit is contained in:
parent
3d93d01cd1
commit
7665d702a2
22 changed files with 97 additions and 132 deletions
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
# Generic Init script if we can't find what kind of Linux we're on
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
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 ogp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid" $agent_user &> $agent_dir/gsp_agent.svc &
|
||||
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
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ogp_agent
|
||||
# Provides: gsp_agent
|
||||
# Required-Start: $all
|
||||
# Required-Stop: $all
|
||||
# Should-Start: $all
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
### END INIT INFO
|
||||
#
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=GSP_USER
|
||||
|
||||
#
|
||||
# main()
|
||||
|
|
@ -90,7 +90,7 @@ start() {
|
|||
fi
|
||||
|
||||
cd $agent_dir
|
||||
out=$(su -c "screen -d -m -t gsp_agent -c ogp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid" $agent_user >/dev/null 2>&1)
|
||||
out=$(su -c "screen -d -m -t gsp_agent -c gsp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid" $agent_user >/dev/null 2>&1)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
# GF: Config is in $agent_dir/Cfg/Config.pm
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=GSP_USER
|
||||
|
||||
depend() {
|
||||
need net
|
||||
|
|
@ -13,7 +13,7 @@ depend() {
|
|||
|
||||
start() {
|
||||
ebegin "Starting GSP Agent"
|
||||
start-stop-daemon --verbose --chdir $agent_dir --start --background --user $agent_user -e PWD="$agent_dir" --exec screen -d -m -t gsp_agent -c ogp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid
|
||||
start-stop-daemon --verbose --chdir $agent_dir --start --background --user $agent_user -e PWD="$agent_dir" --exec screen -d -m -t gsp_agent -c gsp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid
|
||||
eend $? "Failed to start GSP Agent"
|
||||
}
|
||||
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
# chkconfig: 2345 88 10
|
||||
# description: Startup/shutdown script for the GSP Agent
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=GSP_USER
|
||||
service=gsp_agent
|
||||
|
||||
# Source function library.
|
||||
|
|
@ -100,7 +100,7 @@ start() {
|
|||
fi
|
||||
|
||||
cd $agent_dir
|
||||
su -c "screen -d -m -t gsp_agent -c ogp_screenrc -S gsp_agent ./gsp_agent_run -pidfile gsp_agent_run.pid" $agent_user &> $agent_dir/gsp_agent.svc &
|
||||
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 -n "started successfully."
|
||||
bold=`tput bold`
|
||||
normal=`tput sgr0`
|
||||
Loading…
Add table
Add a link
Reference in a new issue