/usr/bin/gsmsmsspool is in gsm-utils 1.10+20120414.gita5e5ae9a-0.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #! /bin/bash
#
# /usr/bin/gsmsmsspool: Queues SMS for sending
#
# written by Matthias Goebl <matthias@goebl.net>
SPOOLDIR=/var/spool/sms
PRIORITIES=3
test -r /etc/default/gsm-utils && . /etc/default/gsm-utils
if [ -z "$1" ]; then
echo "Usage: gsmsmsspool NUMBER [MESSAGE]"
exit 1
fi
priority=$PRIORITIES # default priority
test -n "$GSMSMS_PRIORITY" && priority="$GSMSMS_PRIORITY"
mailto=`id -un`
test -n "$GSMSMS_NOTIFY" && mailto="$GSMSMS_NOTIFY"
tmpfile="$SPOOLDIR/tmp/`date +%s`.$$"
umask 022
echo "$1 $mailto" > "$tmpfile"
if [ -n "$2" ]; then
echo "$2" | head -c 160 >> "$tmpfile"
else
head -c 160 >> "$tmpfile"
fi
if [ "`id -un`" = "root" ]; then
chown gsmsms:gsmsms "$tmpfile"
fi
mv "$tmpfile" "$SPOOLDIR/queue$priority/"
|