aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/ncftpd/scripts
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-08-21 11:27:42 +0800
committerobrien <obrien@FreeBSD.org>2004-08-21 11:27:42 +0800
commit1d432f9628fdc6a9bdf498b7bbf6008d96d654b4 (patch)
tree205c6eb3e456505bdb51db2af11ebb2ca28fbbbc /ftp/ncftpd/scripts
parenta8b4abd4b49be4125731614a319bf28b0fed60d2 (diff)
downloadfreebsd-ports-gnome-1d432f9628fdc6a9bdf498b7bbf6008d96d654b4.tar.gz
freebsd-ports-gnome-1d432f9628fdc6a9bdf498b7bbf6008d96d654b4.tar.zst
freebsd-ports-gnome-1d432f9628fdc6a9bdf498b7bbf6008d96d654b4.zip
Support the very common "./rc_script.sh restart".
Diffstat (limited to 'ftp/ncftpd/scripts')
-rw-r--r--ftp/ncftpd/scripts/ncftpd.sh11
1 files changed, 9 insertions, 2 deletions
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"