
str - SDA handler

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

Display version line and exit.
Display program help and exit.
Verbose mode (off)
Specify ip or hostname of machine to allow enabling of machines remotely. Defaults to localhost's IP.
Specify the SDA server's hostname/ip. Defaults to the BB&G server.
Specify the SDA server's port. Defaults to 8000.

Head over to http://cr.yp.to/daemontools.html and install them.
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.
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.

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

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.

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.

Um.