1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Add $FreeBSD$;

Add LOGIN to REQUIRE;
replace echo + return with err.

Suggested by:	dougb
This commit is contained in:
Dmitry Sivachenko 2012-06-05 17:45:41 +00:00
parent 421984c9ce
commit 0cf5d27d31
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298498
2 changed files with 12 additions and 10 deletions

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: haproxy # PROVIDE: haproxy
# REQUIRE: DAEMON # REQUIRE: DAEMON LOGIN
# KEYWORD: shutdown # KEYWORD: shutdown
####### #######
@ -59,8 +62,7 @@ haproxy_reload()
# Check configuration file quietly first # Check configuration file quietly first
${command} -q -c -f ${haproxy_config} ${command} -q -c -f ${haproxy_config}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error found in ${haproxy_config} - not reloading current process!" err 1 "Error found in ${haproxy_config} - not reloading current process!"
return 1
fi fi
rc_pid=$(check_pidfile ${haproxy_pidfile} ${command}) rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
if [ $rc_pid ]; then if [ $rc_pid ]; then
@ -70,8 +72,7 @@ haproxy_reload()
${command} ${haproxy_flags} -sf ${rc_pid} ${command} ${haproxy_flags} -sf ${rc_pid}
fi fi
else else
echo "No process found. Maybe $command isn't running?" err 1 "No process found. Maybe $command isn't running?"
return 1
fi fi
} }

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: haproxy # PROVIDE: haproxy
# REQUIRE: DAEMON # REQUIRE: DAEMON LOGIN
# KEYWORD: shutdown # KEYWORD: shutdown
####### #######
@ -59,8 +62,7 @@ haproxy_reload()
# Check configuration file quietly first # Check configuration file quietly first
${command} -q -c -f ${haproxy_config} ${command} -q -c -f ${haproxy_config}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error found in ${haproxy_config} - not reloading current process!" err 1 "Error found in ${haproxy_config} - not reloading current process!"
return 1
fi fi
rc_pid=$(check_pidfile ${haproxy_pidfile} ${command}) rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
if [ $rc_pid ]; then if [ $rc_pid ]; then
@ -70,8 +72,7 @@ haproxy_reload()
${command} ${haproxy_flags} -sf ${rc_pid} ${command} ${haproxy_flags} -sf ${rc_pid}
fi fi
else else
echo "No process found. Maybe $command isn't running?" err 1 "No process found. Maybe $command isn't running?"
return 1
fi fi
} }