# Gnokii - smsd

## ddd

Hi,

Can somebody make me a /etc/init.d/smsd -script for gnokii - smsd, please ?

----------

## ddd

I have find a smsd init.d file from Fedora Linux, can somegody fix it to work in Gentoo ?

```

#!/bin/sh

#

# smsd         Starts and stops the Gnokii SMS daemon

#

# chkconfig:   - 95 05

#

# processname: smsd

# description: Gnokii SMS daemon receives and sends SMS messages.

# config:      /etc/gnokiirc

# config:      /etc/sysconfig/smsd

exec=/usr/sbin/smsd

prog=$(basename $exec)

# Make sure relevant files exist

[ -x $exec -a -e /etc/sysconfig/smsd ] || exit 0

# Source SMSD configuration.

. /etc/sysconfig/smsd

[ -n "$SMSD_OPTS" ] || exit 0

[ -z "$SMSD_LOG"  ] || SMSD_OPTS="$SMSD_OPTS --logfile \"$SMSD_LOG\""

# Source function library.

. /etc/rc.d/init.d/functions

lockfile=/var/lock/subsys/$prog

start() {

    # Ensure that we have a writable log file.

    if [ -n "$SMSD_LOG" ]; then

        [ -e "$SMSD_LOG" ] || > "$SMSD_LOG"

        chmod 0640 "$SMSD_LOG"

        chown smsd:gnokii "$SMSD_LOG"

    fi

    echo -n $"Starting Gnokii SMS daemon ($prog): "

    daemon --user smsd $exec $SMSD_OPTS \&

    retval=$?

    echo

    [ $retval -eq 0 ] && touch $lockfile

    return $retval

}

stop() {

    echo -n $"Stopping Gnokii SMS daemon ($prog): "

    killproc $prog

    retval=$?

    echo

    [ $retval -eq 0 ] && rm -f $lockfile

    return $retval

}

restart() {

    stop

    start

}

# See how we were called.

case "$1" in

  start|stop|restart)

    $1

    ;;

  reload|force-reload)

    restart

    ;;

  condrestart|try-restart)

    [ ! -f $lockfile ] || restart

    ;;

  status)

    status $prog

    ;;

  *)

    echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"

    exit 2

esac

```

----------

## jsa

is smsd found on this site: http://www.srnet.cz/~stepan/en/sw/smsd.shtml or is it part of gnokii suite? i finished compilation of gnokii few minutes ago and there is no such a thing as smsd.

does this smsd use smssend as of http://zekiller.skytech.org/smssend_menu_en.html or bash script called sendsms from gnokii? i would like to use prelude/nagios and give them capability of sending smses through gateway.

how do people create sms gateways? using service of providers or using specialized hardware?

the only usable way of sending smses i found yet is through command:

echo "test of sms sending" | gnokii --sendsms +xxxxxxxxxxxx --smsc +xxxxxxxxxxxx

I found some links:

SMS Server Tools / http://smstools.meinemullemaus.de/

SMSLink / http://smslink.sourceforge.net/index.html

Kannel: Open Source WAP and SMS gateway / http://www.kannel.org/

My life would be easier with a reliable SMS gateway. Are there any success stories using GSM modem and FOSS?

----------

## ddd

 *jsa wrote:*   

> i finished compilation of gnokii few minutes ago and there is no such a thing as smsd.

 

Yes there is. 

Add USE="sms" into /etc/make.conf and rebuil gnokii.

----------

## jsa

thanks, it did not come to me.

----------

