This is a discussion on User control of server - Networking ; I have an old PC which acts as a server - fileserver, filtering web proxy, mail server. The only users are family. For years I've run it 24/7, only turning it off when I go on holiday, but I've decided ...
I have an old PC which acts as a server - fileserver, filtering web
proxy, mail server. The only users are family.
For years I've run it 24/7, only turning it off when I go on holiday,
but I've decided in future to run it only when it is needed (1).
While my wife and kids are well up to logging in over SSH and turning it
off from the command line, I'd like to have a point-and-click, or even
automated, solution. I've considered various possible ways of achieving
this, involving either:
(A) scripts on the clients run at startup or shutdown, or from a
..desktop file, which SSH (using RSA authentication) to the server. The
scripts could either run a command on the server or create a file as a
flag which is then checked by a cron job.
(B) continuous monitoring of clients by the server (using nmap or ping)
- see (2) for a quick kludged script.
but before I implement the above is there anything like this already
available? Desirable features would include support for Windows XP - not
essential - and an easy method of override for when I'm downloading
something big directly on the server overnight.
(1) Partly because I've stopped running a publicly accessible web server
on it, and partly because these "old PC"s are getting more powerful, and
power hungry. I used to use a 166MHz Pentium, downclocked to 75 MHz.
That ran *really* cool! That died eventually, so now I've got a 666MHz
PIII, which must consume many times as much power.
HOSTLIST=$(seq 10 20)
while sleep 30
if [ -f /tmp/noautoshutdown
for n in $HOSTLIST
ping -W 2 -c 1 -q $NETWORK.$n > /dev/null && \
AGE=$(expr $(date +%s) - $(date +%s -r delete/) | dc)
if [ "AGE" -ge "600" ]
# More than 10 minutes since a ping reply received