summaryrefslogtreecommitdiff
path: root/japanese/ebnetd/files/ndtpd.sh.sample
diff options
context:
space:
mode:
Diffstat (limited to 'japanese/ebnetd/files/ndtpd.sh.sample')
-rw-r--r--japanese/ebnetd/files/ndtpd.sh.sample49
1 files changed, 0 insertions, 49 deletions
diff --git a/japanese/ebnetd/files/ndtpd.sh.sample b/japanese/ebnetd/files/ndtpd.sh.sample
deleted file mode 100644
index bbf4f41b7508..000000000000
--- a/japanese/ebnetd/files/ndtpd.sh.sample
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh -e -
-# startup script for ndtpd
-
-# Usage: ndtpd.sh [kill|restart|status|terminate|stop|start]
-
-command=$1
-standalone=YES # Run ndtpd as a standalone daemon.
-#standalone=NO # Run ndtpd as a child of inetd.
-
-GetDirective() {
- directive=$1
-
- awk '/^[ ]*'${directive}'[ ]+/ {print $2; exit}' ${conf}
-}
-
-MakeWorkingDirectory() {
- user="`GetDirective user`"
- group="`GetDirective group`"
- work="`GetDirective work-path`"
-
- rm -rf ${work:=@rundir@/ndtpd}
- eval install -d ${user:+-o ${user}} ${group:+-g ${group}} ${work}
-}
-
-conf=@prefix@/etc/ndtpd.conf
-
-[ -f ${conf} ] || exit
-ndtpcheck || exit
-
-if [ "${standalone}" = YES ]; then
- ctrl=ndtpcontrol
- start="echo -n ' ndtpd'; ndtpd"
-else
- ctrl="echo 'Error: inetd invokes ndtpd.' >&2; false"
-fi
-
-case "${command}" in
-kill|restart|status|terminate)
- eval ${ctrl} ${command};;
-
-stop)
- eval ${ctrl} terminate;;
-
-start|*)
- MakeWorkingDirectory
- eval ${start};;
-esac
-
-exit