Skip to content

Instantly share code, notes, and snippets.

@mattiasnorell
Created November 24, 2014 21:32
Show Gist options
  • Save mattiasnorell/82730468706da9b7e9d6 to your computer and use it in GitHub Desktop.
Save mattiasnorell/82730468706da9b7e9d6 to your computer and use it in GitHub Desktop.
#!/bin/sh
from=$SMS_1_NUMBER
message=$SMS_1_TEXT
reply=""
if test "$message" = "Ping"; then
reply="Pong!"
else
reply="Y U NO PLAY PING PONG?"
fi
echo "$reply" | sudo gammu sendsms TEXT "$from"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment