Subversion Repositories ALCASAR

Rev

Rev 1670 | Rev 2262 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1670 Rev 2250
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
-
 
2
# $Id: alcasar-sms.sh 2250 2017-05-22 22:00:03Z tom.houdayer $
2
 
3
 
3
# alcasar-sms.sh
4
# alcasar-sms.sh
4
# by Nicolas Aubry & Rexy
5
# by Nicolas Aubry & Rexy
5
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
6
 
7
 
Line 339... Line 340...
339
		if [ $gammu_pid != "0" ]
340
		if [ $gammu_pid != "0" ]
340
			then
341
			then
341
			echo "gammu is already started"
342
			echo "gammu is already started"
342
		else
343
		else
343
			start_gammu
344
			start_gammu
344
			sed -i "s/\$service_SMS_status=\"false\";/\$service_SMS_status=\"true\";/g" $index_page
345
			sed -i "s/\$service_SMS_status = false;/\$service_SMS_status = true;/g" $index_page
345
			sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
346
			sed -i "s/\$service_SMS_status = false;/\$service_SMS_status = true;/g" $public_page
346
			sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $intercept_page
347
			sed -i "s/\$service_SMS_status = false;/\$service_SMS_status = true;/g" $intercept_page
347
		fi
348
		fi
348
		exit 0
349
		exit 0
349
		;;
350
		;;
350
	--stop)
351
	--stop)
351
		gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
352
		gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
352
		if [ $gammu_pid != "0" ]
353
		if [ $gammu_pid != "0" ]
353
			then
354
			then
354
			stop_gammu
355
			stop_gammu
355
			sed -i "s/\$service_SMS_status=\"true\";/\$service_SMS_status=\"false\";/g" $index_page
356
			sed -i "s/\$service_SMS_status = true;/\$service_SMS_status = false;/g" $index_page
356
			sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
357
			sed -i "s/\$service_SMS_status = true;/\$service_SMS_status = false;/g" $public_page
357
			sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $intercept_page
358
			sed -i "s/\$service_SMS_status = true;/\$service_SMS_status = false;/g" $intercept_page
358
		else
359
		else
359
			echo "gammu is already stopped"
360
			echo "gammu is already stopped"
360
		fi
361
		fi
361
		exit 0 
362
		exit 0 
362
		;;
363
		;;