#!/bin/sh DAEMON=bftpd DAEMON_LONG_NAME=Bftpd . /etc/init.d/modlibrc config() { modlib_config } start() { modlib_startdaemon $DAEMON -d $BFTPD_OPTIONS } case $1 in ""|load) modlib_add_user_and_group ftp users mkdir -p /var/run/bftpd mkdir -p /mod/home/ftp chown ftp:users /mod/home/ftp -R [ -e "/var/tmp/ftp" ] || ln -sf /mod/home/ftp /var/tmp/ftp modreg cgi $DAEMON $DAEMON_LONG_NAME modreg daemon $DAEMON modlib_start $BFTPD_ENABLED ;; unload) modunreg daemon $DAEMON modunreg cgi $DAEMON modlib_stop ;; start) modlib_start ;; stop) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2 exit 1 ;; esac exit 0