Maintaining servers with keepFCalive
Disabling keepFCalive from starting the server
All servers sometimes needs to be upgraded and therefore they need to be down for a while. If you stop the the FirstClass Server and Internet Services please note that keepFCalive will continue it's job, which is start the server softare if they aren't running.
Always remember to deactivate keepFCalive prior to any server upgrades!
1. If you've installed keepFCalive correctly you should have a script named "disableFCalive.sh" in the keepFCalive-folder. You can run it to disable keepFCalive (this is actually based on number 2. below). To disable keepFCalive type this in the terminal:
~fcadmin/keepFCalive/disableFCalive.sh
2. You can deactivate or disable keepFCalive by creating a file or folder named "disableFCalive" inside the keepFCalive folder "~fcadmin/keepFCalive/disableFCalive".
If keepFCalive finds a file named "disableFCalive" in the bin folder it will write this in the logfile:
------------------------------------------------------------------
2005-02-06 20:50:00 keepFCalive is disabled
------------------------------------------------------------------
To avoid keepFCalive from filling the log with lines like this it will automatically rename the file "disableFCalive" to "disableFCalive~". KeepFCalive also checks for the file "disableFCalive~". It won't write any log if it finds that one (unless there is no lofile, in which case it will create one and write that keepFCalive is disabled).
3. You can also deactivate keepFCalive by inserting a # at the beginning of the line in the crontab that executes keepFCalive, or by removing the line entirely (for more information see the Installation section)-
NOTE! If you disable keepFCalive it won't affect the current status of the server. If the server is running it will be running until you stop it or it crashes (let's hope it won't). If it is stopped it will remain stopped.
Enabling keepFCalive again
If you disable keepFCalive using the above methods 1 or 2 you can just remove the file "disableFCalive" or "disableFCalive~" to enable keepFCalive again. You can also use the script "enableFCalive.sh" to enable the keepFCalive again. To enable keepFCalive type this in the terminal:
~fcadmin/keepFCalive/enableFCalive.sh
It will delete the files "disableFCalive" or "disableFCalive~" if it finds either of them and write this to the log:
------------------------------------------------------------------
2005-02-12 09:32:18 Enabled keepFCalive
------------------------------------------------------------------
Shutting down your server
If you need to shut down your server you can run "shutdownFC.sh" included with keepFCalive. It will first disable keepFCalive, then it stops FCIS, wait until it isn't running and stops FCS. To use it, type this in the terminal:
~fcadmin/keepFCalive/shutdownFC.sh
Below the log output:
------------------------------------------------------------------
2005-02-06 20:00:00 Requested shutdown
------------------------------------------------------------------
2005-02-06 20:00:00 Disabled keepFCalive
------------------------------------------------------------------
2005-02-06 20:00:00 FCIS is running, trying to stop it
2005-02-06 20:00:00 FCIS is still running
2005-02-06 20:00:01 FCIS was stopped
------------------------------------------------------------------
2005-02-06 20:00:01 FCS is running, trying to stop it
2005-02-06 20:00:01 FCS is still running
2005-02-06 20:00:02 FCS was stopped
------------------------------------------------------------------
Afterwards you can start the server by enabling keepFCalive, then the server will start next time cron runs keepFCalive.
|