SMS Server Tools 3

Running

Method 1:

Enter /etc/init.d/sms start to start smsd in background.
Enter /etc/init.d/sms stop to stop smsd.

In case of Unix, you might create links in your runlevel directories (for example /etc/rc3.d or /etc/init.d/rc3.d) if the program shall start and stop automatically together with the operating system.

With version >= 3.0 there is an alternate script sms3 in the scripts directory. Using this scipt you can ensure that:
- If smsd is already running, duplicate daemon is not started.
- When smsd is stopped while it is sending a multipart messsage, the script will wait until all parts are sent.
- In case of troubles there is force-stop argument available.

Method 2:

Run /usr/local/bin/smsd -s to start the program in a command window.
Press Ctrl-C to stop the program.

Method 3:

Enter /usr/local/bin/smsd & to start the program in background.
Enter pkill smsd to stop it.


Running smsd as an unpriviledged user

SMS Server Tools inherits priviledges from the user who started the daemon. When smsd is started by root or it's started while loading the operating system, priviledges of root are inherited. In some environments it is more suitable to run smsd with priviledges of a standard user.

There are new settings in the global section of smsd.conf file:

If smsd is started by the user other than root, these settings have no any effect.
When smsd is started by root, group id is changed (if group is defined). If this changing fails, smsd shuts down.
Similarry the user id is changed before smsd forks device processes and before the mainspooler starts.
Recommended setting for the group is the same group who owns a serial device (for example dialout, or uucp).

When running smsd as an unpriviledged user, of course care should be taken with permissions of spool directories. A new system check feature helps with this, as all directories are checked before spooling is started. If there are any problems, they are written to the log file and smsd shuts down. This prevents problems in the future, for example when smsd was run for couple of days and failed directory is first time needed. If a directory is not accessible, smsd stops.

When the smsd is running as an unpriviledged user, additional settings should usually be changed:


Sending a message

Run the command sendsms 491721234567 'Hello, how are you' to send a message or put an SMS file into the Outgoing Folder /var/spool/sms/outgoing.

To read a received message, take a look into the Incoming Folder /var/spool/sms/incoming.