Starting and stopping FogLAMP¶
FogLAMP administration is performed using the “foglamp” command line utility. You must first ssh into the host system. The FogLAMP utility is installed by default in /usr/local/foglamp/bin.
The following command options are available:
Start: Start the FogLAMP system
Stop: Stop the FogLAMP system
Status: Lists currently running FogLAMP services and tasks
Reset: Delete all data and configuration and return FogLAMP to factory settings
Kill: Kill FogLAMP services that have not correctly responded to Stop
Help: Describe FogLAMP options
For example, to start the FogLAMP system, open a session to the FogLAMP device and type:
/usr/local/foglamp/bin/foglamp start
If authentication is enabled, which is the default mode for FogLAMP version 3.0 onward, then a number of the commands require authentication. Authentication can be accomplished by several means;
Set the environment variable USERNAME to be the user name.
Pass the -u flag flag to the command to specify a user name.
If neither of the above are done the user will be prompted to enter a user name.
In both cases the user will be prompted to enter a password. It is possible, but not recommended, to set an environment variable PASSWORD or pass the -p flag on the command line, with the plain text version of the password.
$ /usr/local/foglamp/bin/foglamp -u admin stop
Password:
Stopping FogLAMP..........
FogLAMP Stopped
Note
The start, status and help commands do not require authentication.
It is also possible to use certificate based authentication to login to the system. In this case the “foglamp” command line utility should be passed the -c flag with the name of the certificate file to use to authenticate.
$ /usr/local/foglamp/bin/foglamp -c ~/.foglamp/admin.cert stop
Stopping FogLAMP..........
FogLAMP Stopped
Note
Extreme caution should be taken when storing certificate files that they not be readable by any other user within the system.
Following a successful authentication attempt a time based token is issued that allows the user to run further commands, for a limited time, without the need to authenticate again.