#!/bin/bash # # chkconfig: 345 80 20 # description: Starts and stops the TLSWrap FTPS wrapper . /etc/init.d/functions LISTENON=192.168.10.1 PORT=7000 TLSDIR=/usr/local/bin TLSWRAP=tlswrap stop() { killproc $TLSDIR/$TLSWRAP } start() { echo -n "Starting $TLSWRAP: " $TLSDIR/$TLSWRAP -h $LISTENON -l $PORT echo_success } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status $TLSDIR/$TLSWRAP ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 esac exit 0