Modified foglamp to handle reset requests
@@ -72,6 +72,15 @@ foglamp_reset() {
# Check the storage management script
check_storage_management_script "be reset"
+ # We could have made it easier here, we will improve it later.
+ # For now, check the status of faoglamp, since the server must be down
+ result=`foglamp_status "silent"`
+
+ if [[ $result != "2" ]]; then
+ foglamp_log "info" "FogLAMP appears to be running and it cannot be reset. Stop FogLAMP first." "all" "pretty"
+ exit 0
+ fi
+
# Execute the Storage Plugin Script
# NOTE: this script prepares the storage,
# but it does not start the microservice
@@ -268,6 +277,8 @@ Arguments:
start - Start FogLAMP core (core will start other services).
stop - Stop all FogLAMP services and processes
status - Show the status for the FogLAMP services
+ reset - Restore FogLAMP factory settings
+ WARNING! This command will destroy all your data!
help - This text"
}
