Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: purvis on October 19, 2009, 09:48:47 PM
-
to keep track of boot dates and times where they can be viewed by a web browser
in the directory of /etc/e-smith/events/local
create a file xbootlog using "pico xbootlog"
paste the following code in it with cut and paste
#!/bin/sh
mkdir -p /home/e-smith/files/ibays/Primary/html/serverstatus
date >> /home/e-smith/files/ibays/Primary/html/serverstatus/bootlog.txt
then save your file using ctrl-x
execute the chmod on the file using the command "chmod 775 xbootlog"
to test the the program run the following
/etc/e-smith/events/local/xbootlog
cd /home/e-smith/files/ibays/Primary/html/serverstatus
ls
the ls above is a lower case "L" and lower case "S"
at this point you should see the file bootlog.txt in the listing
now execute "cat bootlog.txt" the view the file
you should see the current date and time when you ran the command line with the xbootlog in it from above.
and to really test it, reboot
and point your browser to your server while adding the extension of "/serverstatus/bootlog.txt" to your url location.
happy trails to you
this thread would of been better served in the contribs section, sorry about that yall