mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Add constant to config.php + enable with installer
This commit is contained in:
parent
1f1fa3711a
commit
bf41d88340
2 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,7 @@ define('RASPI_CHANGETHEME_ENABLED', true);
|
||||||
define('RASPI_VNSTAT_ENABLED', true);
|
define('RASPI_VNSTAT_ENABLED', true);
|
||||||
define('RASPI_SYSTEM_ENABLED', true);
|
define('RASPI_SYSTEM_ENABLED', true);
|
||||||
define('RASPI_MONITOR_ENABLED', false);
|
define('RASPI_MONITOR_ENABLED', false);
|
||||||
|
define('RASPI_RESTAPI_ENABLED', false);
|
||||||
|
|
||||||
// Locale settings
|
// Locale settings
|
||||||
define('LOCALE_ROOT', 'locale');
|
define('LOCALE_ROOT', 'locale');
|
||||||
|
|
|
@ -602,6 +602,8 @@ function _install_restapi() {
|
||||||
sudo mv $webroot_dir/installers/restapi.service /lib/systemd/system/ || _install_status 1 "Unable to move restapi.service file"
|
sudo mv $webroot_dir/installers/restapi.service /lib/systemd/system/ || _install_status 1 "Unable to move restapi.service file"
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable restapi.service || _install_status 1 "Failed to enable restapi.service"
|
sudo systemctl enable restapi.service || _install_status 1 "Failed to enable restapi.service"
|
||||||
|
echo "Enabling RestAPI management option"
|
||||||
|
sudo sed -i "s/\('RASPI_RESTAPI_ENABLED', \)false/\1true/g" "$webroot_dir/includes/config.php" || _install_status 1 "Unable to modify config.php"
|
||||||
|
|
||||||
_install_status 0
|
_install_status 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue