Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Graeme Fleming on May 27, 2003, 10:34:17 PM
-
Hi all
I posted this a coupla weeks ago but got no reply, figured I'd give it one more shot.
Can someone point me in the right direction?? I want to be able to display the current SME update version number on the SME manager login page.
With some further digging it seems I need to modify the head.tmpl or foot.tmpl in /etc/e-smith/web/common or the initial.cgi in /etc/e-smith/web/functions (which it would seem are outside of the template system on a default build).
rpm -q SMEServer provide the output that I want displayed.
a) how can I get this output written on the Server Manager screen??
b) how is this value maintained when an update is installed or removed??
BTW using SME 5.5
TIA
-
Try this:
$ pico /etc/e-smith/events/local/update_version
#!/bin/bash
version=rpm -q SMEServer | sed "s/^SMEServer-//" | sed "s/_/ /"
/sbin/e-smith/db configuration setprop sysconfig ReleaseVersion "$version"
echo "Welcome to hostname, running on SME $version." > /etc/motd
Make this file root-executable:
$ chmod 770 /etc/e-smith/events/local/update_version
$ chown root:root /etc/e-smith/events/local/update_version
Now each time you reboot the version number will be updated in the configuration database and the server-manager will show this in the footer. As a bonus you will also see the version number each time you log-in on the console.
regards,
Michiel
-
Michiel,
Thanks yet again for another brilliant addition to my SME server :-)
Just wondering, I assume that everything on the line starting with a # above is all on the one line right, no line breaks?
Thanks,
Cyrus Bharda
-
Hmm, no. For some reason the forum mailer removed the line breakes. Have a look at the forum webpage and you'll see the correct line breakes.
http://forums.contribs.org/index.php?topic=17501.msg68155#msg68155
Michiel
-
Excellent, thanks Michiel - makes maintenance processes easier for both me and my clients.
-
Look at that, that is just BEAUTIFUL!, thanks again Michiel!!!!!
Cyrus Bharda