source: TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/startup.in @ 773

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/startup.in@987
Revision 773, 1.2 KB checked in by spascoe, 14 years ago (diff)

Initial import of bbftp source

Line 
1#!/bin/sh
2#
3# Startup script for BBFTPD, the BBFTP daemon
4#
5# description:
6# processname: bbftpd
7# pidfile: /var/run/bbftpd.pid
8
9
10PROG=bbftpd
11PID=/var/run/$PROG.pid
12
13case "$1" in
14  start)
15        echo -n "Starting $PROG: "
16        if test "x@with_x509_user_cert@" != "x"; then
17           export X509_USER_CERT=@with_x509_user_cert@
18           export X509_USER_KEY=@with_x509_user_key@
19           export X509_CERT_DIR=@with_x509_cert_dir@
20           export GRIDMAP=@with_gridmap@
21        fi
22        if [ -x @prefix@/bin/$PROG ];then
23           @prefix@/bin/$PROG -b && echo "$PROG started."
24        else
25           echo "$PROG not found."
26        fi
27        ;;
28
29  stop)
30        echo -n "Shutting down $PROG: "
31        if [ -f $PID ];then
32           kill `cat $PID` && echo "$PROG stopped."
33           rm -f $PID
34        else
35           echo "$PROG already stopped."
36        fi
37        ;;
38
39  reload|restart)
40        $0 stop
41        sleep 1
42        $0 start
43        ;;
44
45  status)
46        if [ -f ${PID} ];then
47           echo "${PROG} is running (process `cat ${PID}`)."
48        else
49           echo "$PROG is not running."
50        fi
51        ;;
52
53  *)
54        echo "Usage: $0 {start|stop|restart|reload|status}"
55        exit 1
56        ;;
57esac
58
59# The End.
60exit 0
61
Note: See TracBrowser for help on using the repository browser.