mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Add $FreeBSD$;
Add LOGIN to REQUIRE; replace echo + return with err. Suggested by: dougb
This commit is contained in:
parent
421984c9ce
commit
0cf5d27d31
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298498
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: haproxy
|
||||
# REQUIRE: DAEMON
|
||||
# REQUIRE: DAEMON LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#######
|
||||
@ -59,8 +62,7 @@ haproxy_reload()
|
||||
# Check configuration file quietly first
|
||||
${command} -q -c -f ${haproxy_config}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error found in ${haproxy_config} - not reloading current process!"
|
||||
return 1
|
||||
err 1 "Error found in ${haproxy_config} - not reloading current process!"
|
||||
fi
|
||||
rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
|
||||
if [ $rc_pid ]; then
|
||||
@ -70,8 +72,7 @@ haproxy_reload()
|
||||
${command} ${haproxy_flags} -sf ${rc_pid}
|
||||
fi
|
||||
else
|
||||
echo "No process found. Maybe $command isn't running?"
|
||||
return 1
|
||||
err 1 "No process found. Maybe $command isn't running?"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: haproxy
|
||||
# REQUIRE: DAEMON
|
||||
# REQUIRE: DAEMON LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#######
|
||||
@ -59,8 +62,7 @@ haproxy_reload()
|
||||
# Check configuration file quietly first
|
||||
${command} -q -c -f ${haproxy_config}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error found in ${haproxy_config} - not reloading current process!"
|
||||
return 1
|
||||
err 1 "Error found in ${haproxy_config} - not reloading current process!"
|
||||
fi
|
||||
rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
|
||||
if [ $rc_pid ]; then
|
||||
@ -70,8 +72,7 @@ haproxy_reload()
|
||||
${command} ${haproxy_flags} -sf ${rc_pid}
|
||||
fi
|
||||
else
|
||||
echo "No process found. Maybe $command isn't running?"
|
||||
return 1
|
||||
err 1 "No process found. Maybe $command isn't running?"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user