mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix raspap.service install path, add error handling
This commit is contained in:
parent
d1de71318b
commit
21273774a5
@ -294,10 +294,10 @@ function default_configuration() {
|
||||
|
||||
if [ ! -f "/etc/systemd/system/iptables.service" ]; then
|
||||
echo "Enabling iptables.service"
|
||||
sudo cp $webroot_dir/installers/iptables.service /etc/systemd/system/
|
||||
sudo cp $webroot_dir/installers/iptables.service /etc/systemd/system/ || install_error "Unable to move iptables.service file"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable iptables.service
|
||||
sudo systemctl start iptables.service
|
||||
sudo systemctl enable iptables.service || install_error "Failed to enable iptables.service"
|
||||
sudo systemctl start iptables.service || install_error "Unable to start iptables.service"
|
||||
fi
|
||||
|
||||
# Prompt to install RaspAP daemon
|
||||
@ -319,8 +319,10 @@ function default_configuration() {
|
||||
function enable_raspap_daemon() {
|
||||
install_log "Enabling RaspAP daemon"
|
||||
echo "Disable with: sudo systemctl disable raspap.service"
|
||||
sudo cp $webroot_dir/installers/raspap.service /lib/systemd/system/ || install_error "Unable to move raspap.service file"
|
||||
sudo cp $webroot_dir/installers/raspap.service /etc/systemd/system/ || install_error "Unable to move raspap.service file"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable raspap.service || install_error "Failed to enable raspap.service"
|
||||
sudo systemctl start raspap.service || intall_error "Unable to start raspap.service"
|
||||
}
|
||||
|
||||
# Add a single entry to the sudoers file
|
||||
|
Loading…
Reference in New Issue
Block a user