home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.parl.clemson.edu
/
2015-02-07.ftp.parl.clemson.edu.tar
/
ftp.parl.clemson.edu
/
pub
/
pvfs2
/
orangefs-2.8.3-20110323.tar.gz
/
orangefs-2.8.3-20110323.tar
/
orangefs
/
examples
/
pvfs2-server.rc.in
Wrap
Text File
|
2007-12-07
|
1KB
|
67 lines
#!/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