On Sat 14 Jun 2014 at 20:09:41 +0200, Pol Hallen wrote:

> on debian stable I added a script to /etc/init.d/, that script sends
> an email when the system boot and when the system shutdown

But you are are not going to show this script to us. It is a secret. so
we do not know whether it is a viable, working script. You may know but
you do not tell us. If you did, the tweaking may be worth the effort.

> I need run that script before that postfix has killed
> 
> what's the best way to fill:
> 
> cat /etc/init.d/systememail
> 
> #!/bin/sh
> ### BEGIN INIT INFO
> # Provides: SystemEmail
> # Required-Start: $remote_fs $syslog $ALL
> # Required-Stop: $syslog
> # Default-Start: 2 3 4 5
> # Default-Stop: 0 1 6
> # Short-Description: Send email
> [...]

Ah, this is it; you want someone to write a script from scratch for you.
You provide the well known stock headers. We do the work.

> normally after created a script I do:
> 
> insserv /etc/init.d/name_of_script

That's nice to know. You get to do a little bit of work.

You might want to look at @reboot with cron for the startup. Don't say I
didn't help you.

Now for something completely off-topic:

The domain for your email address is naff. It marks you out as being 
someone who doesn't mind being regarded as a plonker.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140614191608.gb17...@copernicus.demon.co.uk

Reply via email to