shutdown on process termination - BSD

This is a discussion on shutdown on process termination - BSD ; Hi all Is there a standard/nice way to shutdown when an arbitrary process quits? I would like to wget some files and when done automatically power off. Thanks a lot Damian...

+ Reply to Thread
Results 1 to 2 of 2

Thread: shutdown on process termination

  1. shutdown on process termination

    Hi all

    Is there a standard/nice way to shutdown when an arbitrary process
    quits? I would like to wget some files and when done automatically
    power off.

    Thanks a lot
    Damian


  2. Re: shutdown on process termination

    Damian wrote:
    > Hi all
    >
    > Is there a standard/nice way to shutdown when an arbitrary process
    > quits? I would like to wget some files and when done automatically
    > power off.


    In a bourne-like sh (/bin/sh, /bin/ksh, bash, or whatever):

    wget -O http://some.server.com/stuff http://some.server.com/more_stuff;\
    halt

    (Mind the \ - it's used to continue the line.)

    This will wget stuff and then shutdown.

    Take a look at /etc/rc.shutdown if you want the machine to automatically
    power off, too (shutdown, per se, does not mean the machine needs to be
    off afterwards - only the OS is shut down).

    Joachim

+ Reply to Thread