1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Support the very common "./rc_script.sh restart".

This commit is contained in:
David E. O'Brien 2004-08-21 03:27:42 +00:00
parent 7dc9c23fdd
commit cb0a86a6c9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=116866

View File

@ -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"