mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Catch error & return install_status on failure
This commit is contained in:
parent
fcd3a7f204
commit
316b161671
@ -158,8 +158,8 @@ function _set_php_package() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prompts the user to stop & disable Debian's systemd-networkd services
|
# Prompts the user to stop & disable Debian's systemd-networkd services.
|
||||||
# It isn't possible to mix Debian networking with dhcpcd
|
# It isn't possible to mix Debian networking with dhcpcd.
|
||||||
# On Ubuntu 20.04 / Armbian 22, the systemd-resolved service uses port 53
|
# On Ubuntu 20.04 / Armbian 22, the systemd-resolved service uses port 53
|
||||||
# by default which prevents dnsmasq from starting.
|
# by default which prevents dnsmasq from starting.
|
||||||
function _manage_systemd_services() {
|
function _manage_systemd_services() {
|
||||||
@ -175,12 +175,12 @@ function _manage_systemd_services() {
|
|||||||
if [ "$answer" != "${answer#[Nn]}" ]; then
|
if [ "$answer" != "${answer#[Nn]}" ]; then
|
||||||
echo -e
|
echo -e
|
||||||
else
|
else
|
||||||
sudo systemctl stop "$svc".service
|
sudo systemctl stop "$svc".service || _install_status 1 "Unable to stop ${svc}.service"
|
||||||
sudo systemctl disable "$svc".service
|
sudo systemctl disable "$svc".service || _install_status 1 "Unable to disable ${svc}.service"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sudo systemctl stop "$svc".service
|
sudo systemctl stop "$svc".service || _install_status 1 "Unable to stop ${svc}.service"
|
||||||
sudo systemctl disable "$svc".service
|
sudo systemctl disable "$svc".service || _install_status 1 "Unable to disable ${svc}.service"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "${svc}.service is not running (OK)"
|
echo "${svc}.service is not running (OK)"
|
||||||
|
Loading…
Reference in New Issue
Block a user