Skip to content
Permalink
1139b72d5e
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
66 lines (58 sloc) 1.38 KB
#!/bin/sh
#
# description: pvfs2-server is the server component of PVFS2
#
# chkconfig: 345 35 55
# Source function library.
. /etc/rc.d/init.d/functions
# set these if you want to hard code the location of the config files:
PVFS2_FS_CONF=
# override this if your server binary resides elsewhere
PVFS2SERVER=@prefix@/sbin/pvfs2-server
# override this if you want servers to automatically pick a conf file,
# but you just need to specify what directory they are in
PVFS2_CONF_PATH=/etc
# the server will record its PID in this file
PVFS2_PIDFILE=/var/run/pvfs2.pid
# verify presence of server binary
if ! [ -x ${PVFS2SERVER} ]; then
echo "Error: could not find executable ${PVFS2SERVER}"
exit 1
fi
# look for fs conf
if test "x$PVFS2_FS_CONF" = x
then
PVFS2_FS_CONF=${PVFS2_CONF_PATH}/pvfs2-fs.conf
fi
if ! [ -r ${PVFS2_FS_CONF} ]; then
echo "Error: could not read ${PVFS2_FS_CONF}"
exit 1
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting PVFS2 server: "
daemon ${PVFS2SERVER} --pidfile ${PVFS2_PIDFILE} ${PVFS2_FS_CONF}
echo
touch /var/lock/subsys/pvfs2-server
;;
stop)
echo -n "Stopping PVFS2 server: "
kill `cat /var/run/pvfs2.pid`
echo
rm -f /var/lock/subsys/pvfs2-server
;;
status)
status pvfs2-server
;;
restart)
$0 stop
# give server time to die cleanly
sleep 2
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0