1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Added prompt to install raspap.service

This commit is contained in:
billz 2019-04-21 10:59:36 +00:00
parent b54289098e
commit be24aa2a20

View File

@ -222,11 +222,15 @@ function default_configuration() {
sudo systemctl daemon-reload sudo systemctl daemon-reload
# Install and enable RaspAP daemon # Install and enable RaspAP daemon
echo -n "Enable RaspAP control service (Recommended)? [Y/n]: "
read answer
if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
echo -n "Enabling RaspAP daemon. Disable with: sudo systemctl disable raspap.service"
sudo mv $webroot_dir/installers/raspap.service /lib/systemd/system/ || install_error "Unable to move raspap.service file" sudo mv $webroot_dir/installers/raspap.service /lib/systemd/system/ || install_error "Unable to move raspap.service file"
#sudo systemctl enable raspap.service sudo systemctl enable raspap.service || install_error "Failed to enable raspap.service"
fi
} }
# Add a single entry to the sudoers file # Add a single entry to the sudoers file
function sudo_add() { function sudo_add() {
sudo bash -c "echo \"www-data ALL=(ALL) NOPASSWD:$1\" | (EDITOR=\"tee -a\" visudo)" \ sudo bash -c "echo \"www-data ALL=(ALL) NOPASSWD:$1\" | (EDITOR=\"tee -a\" visudo)" \
@ -312,7 +316,7 @@ function optimize_php() {
fi fi
if [ "$php_package" = "php7.0-cgi" ]; then if [ "$php_package" = "php7.0-cgi" ]; then
echo -n "Enable PHP OPCache? [Y/n]: " echo -n "Enable PHP OPCache (Recommended)? [Y/n]: "
read answer read answer
if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
echo "Php-cgi enabling opcache.enable." echo "Php-cgi enabling opcache.enable."