Skip to content

Commit

Permalink
add contrib script for gnokii
Browse files Browse the repository at this point in the history
  • Loading branch information
antonraharja committed Jul 9, 2015
1 parent 5bc4377 commit 17efe7a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
14 changes: 14 additions & 0 deletions web/plugin/gateway/gnokii/contrib/gnokii_smsd_checker
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

. /etc/default/playsms

while true
do
killall -9 smsd >/dev/null 2>&1
sleep 3
CWD=`pwd`
cd $PLAYSMS_LOG
nohup /usr/sbin/smsd -m file -c $PLAYSMS_SPOOL -u $PLAYSMS_BIN/gnokii_smsd_incoming -f $PLAYSMS_LOG/gnokii_smsd_logs >/dev/null 2>&1 &
cd $CWD
sleep 16m
done
13 changes: 13 additions & 0 deletions web/plugin/gateway/gnokii/contrib/gnokii_smsd_incoming
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

. /etc/default/playsms

SMSD_FILE=`mktemp -q $PLAYSMS_SPOOL/ERR.in.XXXXXX`

touch $SMSD_FILE

chmod 666 $SMSD_FILE

echo -e "$2\n$1" > $SMSD_FILE

cat >> $SMSD_FILE
8 changes: 8 additions & 0 deletions web/plugin/gateway/gnokii/contrib/gnokii_smsd_start
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

. /etc/default/playsms

CWD=`pwd`
cd $PLAYSMS_BIN
./gnokii_smsd_checker >/dev/null 2>&1 &
cd $CWD
6 changes: 6 additions & 0 deletions web/plugin/gateway/gnokii/contrib/gnokii_smsd_stop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

. /etc/default/playsms

killall -9 smsd >/dev/null 2>&1
killall -9 gnokii_smsd_checker >/dev/null 2>&1

0 comments on commit 17efe7a

Please sign in to comment.