Skip to content

Instantly share code, notes, and snippets.

@vladbabii
Created November 21, 2017 21:22
Show Gist options
  • Save vladbabii/aeb71f7383117917b1e577d2ab4017ac to your computer and use it in GitHub Desktop.
Save vladbabii/aeb71f7383117917b1e577d2ab4017ac to your computer and use it in GitHub Desktop.
UtmKeeper Cron Check RDS Romania USB Modem ZTE WCDMA Technologies MSM
#!/bin/bash
echo "Starting check at `date`"
echo "checking... "
ps -aux | grep -v grep | grep "keeper" | grep "19d2:1515" > /dev/null
result=$?
echo "exit code: ${result}"
echo "---"
if [ "${result}" -eq "0" ] ; then
echo "service running, everything is fine"
else
echo "is not running"
echo "starting... "
cd /opt/utmskeeper/
mkdir -p /run/utmskeeper
chmod -R 777 /run/utmskeeper
./umtskeeper --sakisoperators "USBINTERFACE='0' OTHER='USBMODEM' USBMODEM='19d2:1515' APN='CUSTOM_APN' CUSTOM_APN='internet' APN_USER='internet' APN_PASS='internet'" --sakisswitches "--sudo --console" --nostats --statfilepath '/opt/utmsweb/' --devicename 'ZTE WCDMA Technologies MSM' --nat 'yes' &>> /opt/utmsweb/error.log &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment