Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3152608
ccsd
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ccsd
View Options
#!/bin/bash
#
# ccsd start/stop ccsd
#
# chkconfig: 345 20 80
# description: Starts and stops ccsd
#
#
### BEGIN INIT INFO
# Provides:
### END INIT INFO
CCSD_OPTS=
. /etc/init.d/functions
[ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
LOCK_FILE="/var/lock/subsys/ccsd"
start()
{
echo -n "Starting ccsd:"
status ccsd &> /dev/null
if [ $? -ne 0 ]
then
action $"" ccsd $CCSD_OPTS
return $?
fi
success "start"
echo
return 0
}
stop()
{
echo -n "Stopping ccsd:"
for sec in $(seq 1 10)
do
if pidof ccsd > /dev/null
then
# get the pid of ccsd from /var/run/cluster/ccsd.pid
# and break if the file is not there
[ -r /var/run/cluster/ccsd.pid ] || break
pid=$(cat /var/run/cluster/ccsd.pid )
kill $pid 2> /dev/null || break
sleep 1
else
success "shutdown"
echo
return 0
fi
done
failure "shutdown"
echo
return 1
}
rtrn=1
# See how we were called.
case "$1" in
start)
start
rtrn=$?
[ $rtrn = 0 ] && touch $LOCK_FILE
;;
stop)
stop
rtrn=$?
[ $rtrn = 0 ] && rm -f $LOCK_FILE
;;
restart)
$0 stop
$0 start
rtrn=$?
;;
status)
status ccsd
rtrn=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
;;
esac
exit $rtrn
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Tue, Feb 25, 12:52 AM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1464570
Default Alt Text
ccsd (1 KB)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment