mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
fix wrong return code from rc.d script (#50)
This commit is contained in:
committed by
Franco Fichtner
parent
2f5bcb706d
commit
910f489afb
@@ -17,8 +17,10 @@ reload_cmd="ftpproxy_reload"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
eval osftpproxy_flags=\$osftpproxy_${2}
|
||||
pidfile="/var/run/osftpproxy.$2.pid"
|
||||
if [ -n "$2" ]; then
|
||||
eval osftpproxy_flags=\$osftpproxy_${2}
|
||||
pidfile="/var/run/osftpproxy.$2.pid"
|
||||
fi
|
||||
|
||||
ftpproxy_start () {
|
||||
ftpproxy_status
|
||||
@@ -61,7 +63,7 @@ ftpproxy_restart () {
|
||||
}
|
||||
|
||||
ftpproxy_status () {
|
||||
if [ -z "$osftpproxy_flags" -o -z "$pidfile" ]; then
|
||||
if [ -z "$pidfile" ]; then
|
||||
err 1 "Instance name unknown"
|
||||
fi
|
||||
run_rc_command "status"
|
||||
@@ -143,7 +145,7 @@ case $1 in
|
||||
exit $?
|
||||
;;
|
||||
status)
|
||||
if [ -z "$osftpproxy_flags" -o -z "$pidfile" ]; then
|
||||
if [ -z "$osftpproxy_flags" -a -z "$pidfile" ]; then
|
||||
if [ -n "$osftpproxy_instances" ]; then
|
||||
for i in $osftpproxy_instances; do
|
||||
eval osftpproxy_flags=\$osftpproxy_${i}
|
||||
|
||||
Reference in New Issue
Block a user