install_postfixadmin.sh: Fix error in restarting PHP engine in case of installed ba debian package system.
This commit is contained in:
1 parent
1278bfcfd0
commit
253eca42d4
1 file changed
+17
-7
+17
-7
@@ -3746,6 +3746,7 @@ if [[ -n "$php_major_versions" ]]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo_skipped
|
echo_skipped
|
||||||
|
warn "Neither an init-script nor a service file for PHP v${_ver} found!"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
@@ -3753,17 +3754,26 @@ else
|
|||||||
echononl " Retart PHP FPM engine v${php_major_version}.."
|
echononl " Retart PHP FPM engine v${php_major_version}.."
|
||||||
if [[ -f "/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm" ]] ; then
|
if [[ -f "/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm" ]] ; then
|
||||||
/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm restart > $log_file 2>&1
|
/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm restart > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
elif [[ -f "/usr/lib/systemd/system/php${php_major_version}-fpm.service" ]] ; then
|
||||||
|
systemctl restart php8.4-fpm.service > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo_skipped
|
echo_skipped
|
||||||
fi
|
warn "Neither an init-script nor a service file for PHP v${php_major_version} found!"
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo_ok
|
|
||||||
else
|
|
||||||
echo_failed
|
|
||||||
error "$(cat $log_file)"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo_skipped
|
warn "No PHP installation found!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user