The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

str - SDA handler

SYNOPSIS

str [-V | -h | -v [ -i ip ] [ -s host ] [ -p port] ]

OPTIONS

-V

Display version line and exit.

-h

Display program help and exit.

-v

Verbose mode (off)

-i ip

Specify ip or hostname of machine to allow enabling of machines remotely. Defaults to localhost's IP.

-s host

Specify the SDA server's hostname/ip. Defaults to the BB&G server.

-s port

Specify the SDA server's port. Defaults to 8000.

RECOMMENDED INSTALLATION FOR PERMANENT EXECUTION (under Unix variants)

Head over to http://cr.yp.to/daemontools.html and install them.

The Quick Way

    mkdir -p /etc/svscan/str/log
    mkdir -p /var/log/str
    groupadd nofiles
    groupadd -g nofiles sdaclnt
    chown sdaclnt:nofiles /var/log/str
    cp str /etc/svscan/str
    cd /etc/svscan/str
    echo "username\npassword\n" > logindetails

Create run as per:

    #!/bin/sh
    exec /usr/local/bin/setuidgid sdaclnt ./str < ./logindetails 2>&1

and log/run

    #!/bin/sh
    exec /usr/local/bin/setuidgid sdaclnt \
    /usr/local/bin/multilog t /var/log/str

Then

    chmod 755 run log/run
    ln -s /etc/svscan/str /service

And if you 'pstree' or similar, you should see str happily running.

Explanatory

Make a directory /etc/svscan/str and put the following 'run' file into it:

    #!/bin/sh
    exec /usr/local/bin/setuidgid sdaclnt ./str < ./logindetails 2>&1

Create /etc/svscan/str/log/run as per:

    #!/bin/sh
    exec /usr/local/bin/setuidgid sdaclnt \
    /usr/local/bin/multilog t /var/log/str

Create a 'logindetails' file that has your username on one line and your password on the next.

Your directory structure should look like:

    /etc/svscan/str/
      |- log/
      |  '- run
      |- logindetails
      |- run
      '- str

Create a group 'nofiles' if you haven't already got one (see groupadd(8)). Create a user 'sdaclnt' in that group (useradd(8)).

Create a directory /var/log/str and chown sdaclnt:nofiles it.

Ensure str is in /etc/svscan/str and then link the str directory in to /service.

Then, if you want to logout, do 'svc -d /service/str' To login after that do 'svc -u /service/str'. To give it a kick (log you off, log you back in), do 'svc -t /service/str'.

Basically, this all means that you get a log of what str does while it's being a daemon and you can also easily stop it, start it, restart it, whatever.

AUTHOR

Iain Truskett <ict@eh.org> <http://eh.org/~koschei/>

COPYRIGHT

This program is Copyright (c) 2001 Iain Truskett. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

ACKNOWLEDGEMENTS

I would like to thank TBBle for his initial research into the protocol, Starnet for providing such a dodgy protocol, and Bruceo and JT for providing incentive to actually bother to write this program.

SEE ALSO

Um.