diff options
author | obrien <obrien@FreeBSD.org> | 2004-08-21 11:27:42 +0800 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-08-21 11:27:42 +0800 |
commit | 1d432f9628fdc6a9bdf498b7bbf6008d96d654b4 (patch) | |
tree | 205c6eb3e456505bdb51db2af11ebb2ca28fbbbc /ftp/ncftpd | |
parent | a8b4abd4b49be4125731614a319bf28b0fed60d2 (diff) | |
download | freebsd-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')
-rw-r--r-- | ftp/ncftpd/scripts/ncftpd.sh | 11 |
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" |