aboutsummaryrefslogtreecommitdiff
path: root/net/smokeping/files
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2002-04-01 13:47:18 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2002-04-01 13:47:18 +0000
commite20d94225ac745485beadf59362f7fb1110c10a2 (patch)
tree72dca13399ada9e50ca8b5708f7c7e460643daae /net/smokeping/files
parent783c54116d30b300a54bd1b622d9ea4f44a0c61b (diff)
Add smokeping UID and GID if not exist and use them to be invoked as.
Move configuration file to $PREFIX/etc/smokeping. Use $PREFIX/var/smokeping for PID file and generated data.
Notes
Notes: svn path=/head/; revision=57137
Diffstat (limited to 'net/smokeping/files')
-rw-r--r--net/smokeping/files/smokeping.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/smokeping/files/smokeping.sh b/net/smokeping/files/smokeping.sh
index 44e3bd0309f5..018a71bace7d 100644
--- a/net/smokeping/files/smokeping.sh
+++ b/net/smokeping/files/smokeping.sh
@@ -7,13 +7,19 @@ fi
case "$1" in
start)
- [ -r ${PREFIX}/smokeping/etc/config ] && ${PREFIX}/bin/smokeping > /dev/null && echo -n ' smokeping'
+ [ -r ${PREFIX}/etc/smokeping/config ] && \
+ su -f -m smokeping -c ${PREFIX}/bin/smokeping > /dev/null && \
+ echo -n ' smokeping'
;;
restart)
- [ -r ${PREFIX}/smokeping/etc/config ] && ${PREFIX}/bin/smokeping --restart > /dev/null && echo -n ' smokeping'
+ [ -r ${PREFIX}/etc/smokeping/config ] && \
+ su -f -m smokeping -c ${PREFIX}/bin/smokeping --restart > /dev/null && \
+ echo -n ' smokeping'
;;
stop)
- [ -r /var/run/smokeping.pid ] && kill `cat /var/run/smokeping.pid` > /dev/null && echo -n ' smokeping'
+ [ -r ${PREFIX}/var/smokeping/smokeping.pid ] && \
+ su -f -m smokeping -c kill `cat ${PREFIX}/var/smokeping/smokeping.pid` > /dev/null && \
+ echo -n ' smokeping'
;;
*)
echo "Usage: `basename $0` {start|restart|stop}" >&2