[Gllug] Daily timed shutdown script

Matthew King matthew.king at monnsta.net
Fri Jul 27 06:44:50 UTC 2007


Dylan <dylan at dylan.me.uk> writes:

> Hello All,
>
> I've been asked to put together a script which will shut down a server at a 
> configurable time each day. So far so good - set up a cron job to check the 
> time and halt the machine.
>
> Unfortunately, the machine provides the following services: ftp (vsftp), nfs, 
> samba (file and print,) cups, and ssh, along with performing gateway 
> functions. Obviously, I would need to check, for each service, whether there 
> is an active connection, and delay the shutdown until any such connections 
> have terminated.
>
> So, what experience and advice can anyone offer in these areas?

Uh... don't?

That is to say, either ignore the connections or don't shut it down. If
there are connections then the box is being used, and if it's being used
then shutting it down won't help any.

I suspect a power-saving mode may be more up your street.

Matthew

-- 
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
                                           --  Fran Lebowitz
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list