#!/bin/bash SCRIPT_PATH=/usr/bin/t3hs/t3hs_sim800 case "$1,$2" in start,gpio) "$SCRIPT_PATH" gpio on ;; start,mqtt) "$SCRIPT_PATH" mqtt on ;; stop,gpio) "$SCRIPT_PATH" gpio off ;; stop,mqtt) "$SCRIPT_PATH" mqtt off ;; restart,gpio) $0 stop gpio sleep 10 $0 start gpio ;; restart,mqtt) $0 stop mqtt sleep 10 $0 start mqtt ;; *) echo "Usage: $0 {start|stop|restart} {gpio|mqtt}" exit 1 esac exit 0