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.
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:
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:
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.