fix wrong return code from rc.d script (#50)

This commit is contained in:
fbrendel
2016-11-03 09:40:17 +01:00
committed by Franco Fichtner
parent 2f5bcb706d
commit 910f489afb
+6 -4
View File
@@ -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}