aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2010-12-01 07:13:56 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2010-12-01 07:13:56 +0000
commitaffae694e35e5290b3d682d8a14535f14130a383 (patch)
tree1ed85472a44b04f8245bb251bc818c033ceddfb7
parent5e83453656b3630864e0745758585288ebdde6a1 (diff)
downloadports-affae694e35e5290b3d682d8a14535f14130a383.tar.gz
ports-affae694e35e5290b3d682d8a14535f14130a383.zip
- s/login/LOGIN/ in rc script
- cleaner way to handle pre_cmd - cleanup pid file left behind Reported by: dougb
Notes
Notes: svn path=/head/; revision=265499
-rw-r--r--www/fcgiwrap/files/fcgiwrap.in11
1 files changed, 4 insertions, 7 deletions
diff --git a/www/fcgiwrap/files/fcgiwrap.in b/www/fcgiwrap/files/fcgiwrap.in
index 82f4f451d1c4..39bc2084701d 100644
--- a/www/fcgiwrap/files/fcgiwrap.in
+++ b/www/fcgiwrap/files/fcgiwrap.in
@@ -5,7 +5,7 @@
# fcgiwrap startup script
#
# PROVIDE: fcgiwrap
-# REQUIRE: login
+# REQUIRE: LOGIN
# KEYWORD: shutdown
#
@@ -36,11 +36,7 @@ fcgiwrap_setfib() {
fcgiwrap_precmd() {
fcgiwrap_setfib
-
- test -d /var/run/fcgiwrap || mkdir -p /var/run/fcgiwrap
- if [ -n "${fcgiwrap_user}" ]; then
- chown -R ${fcgiwrap_user} /var/run/fcgiwrap
- fi
+ install -d -o $fcgiwrap_user -m 755 /var/run/fcgiwrap
}
fcgiwrap_cleansocket() {
@@ -50,7 +46,7 @@ fcgiwrap_cleansocket() {
test -S ${fcgiwrap_socket#unix:} && rm -f ${fcgiwrap_socket#unix:}
;;
esac
-
+ rm -f $pidfile
}
. /etc/rc.subr
@@ -68,6 +64,7 @@ load_rc_config $name
fcgiwrap_enable=${fcgiwrap_enable:-"NO"}
fcgiwrap_fib=${fcgiwrap_fib:-"NONE"}
+fcgiwrap_user=${fcgiwrap_user:-"root"}
fcgiwrap_socket=${fcgiwrap_socket:-"unix:/var/run/fcgiwrap/fcgiwrap.sock"}
command_args="-f -p ${pidfile} ${procname} -s ${fcgiwrap_socket}"