Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1605 → Rev 1606

/scripts/alcasar-sms.sh
336,28 → 336,28
;;
--start)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
echo "gammu is already started"
else
start_gammu
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $index_page
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
fi
exit 0
;;
--stop)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
stop_gammu
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $index_page
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
else
echo "gammu is already stopped"
fi
exit 0
;;
if [ $gammu_pid != "0" ]
then
echo "gammu is already started"
else
start_gammu
sed -i "s/\$service_SMS_status=\"false\";/\$service_SMS_status=\"true\";/g" $index_page
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
fi
exit 0
;;
--stop)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
stop_gammu
sed -i "s/\$service_SMS_status=\"true\";/\$service_SMS_status=\"false\";/g" $index_page
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
else
echo "gammu is already stopped"
fi
exit 0
;;
--pidof)
/sbin/pidof gammu-smsd
;;