From cb0a86a6c9b59b33da9dfcae9f9cf3357c27f302 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 21 Aug 2004 03:27:42 +0000 Subject: Support the very common "./rc_script.sh restart". --- ftp/ncftpd/scripts/ncftpd.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ftp/ncftpd/scripts/ncftpd.sh') diff --git a/ftp/ncftpd/scripts/ncftpd.sh b/ftp/ncftpd/scripts/ncftpd.sh index 6799c0c7cf20..24030cdfe188 100644 --- a/ftp/ncftpd/scripts/ncftpd.sh +++ b/ftp/ncftpd/scripts/ncftpd.sh @@ -1,8 +1,15 @@ #!/bin/sh if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 + case $(dirname $0) in + .) + PREFIX=$(pwd) + ;; + *) + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 + ;; +esac fi args="${PREFIX}/etc/ncftpd/general.cf ${PREFIX}/etc/ncftpd/domain.cf" -- cgit v1.2.3