mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Add constant to config.php + enable with installer
This commit is contained in:
		| @@ -59,6 +59,7 @@ define('RASPI_CHANGETHEME_ENABLED', true); | ||||
| define('RASPI_VNSTAT_ENABLED', true); | ||||
| define('RASPI_SYSTEM_ENABLED', true); | ||||
| define('RASPI_MONITOR_ENABLED', false); | ||||
| define('RASPI_RESTAPI_ENABLED', false); | ||||
|  | ||||
| // Locale settings | ||||
| 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 systemctl daemon-reload | ||||
|     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 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user