[Gllug] Daily timed shutdown script
Bruce Richardson
itsbruce at workshy.org
Fri Jul 27 11:24:02 UTC 2007
On Fri, Jul 27, 2007 at 12:19:52AM +0100, Dylan wrote:
> 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.
Why? If they simply want the services to be stopped, shut down the
services.
>
> 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.
In some cases, shutting down the service will not terminate individual
connections (e.g. ssh). So if you were to simply shut down services
rather than halt the machine, these services would not see interruptions
to individual connections. But again this raises the question of the
reason for the shutdown - what are they trying to achieve? Depending on
the answer, it may be necessary to halt connections rather than allow
remote users to keep the system up indefinitely.
So more information required.
--
Bruce
I unfortunately do not know how to turn cheese into gold.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20070727/c66cb50a/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list