Subversion Repositories ALCASAR

Rev

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

Rev 1502 Rev 1606
Line 339... Line 339...
339
		if [ $gammu_pid != "0" ]
339
        if [ $gammu_pid != "0" ]
340
			then
340
            then
341
			echo "gammu is already started"
341
                echo "gammu is already started"
342
		else
342
            else
343
			start_gammu
343
                start_gammu
344
			sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $index_page
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" $public_page
345
                sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
346
		fi
346
        fi
347
		exit 0
347
        exit 0
348
		;;
348
        ;;
349
	--stop)
349
    --stop)
350
		gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
350
        gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
351
		if [ $gammu_pid != "0" ]
351
        if [ $gammu_pid != "0" ]
352
			then
352
            then
353
			stop_gammu
353
                stop_gammu
354
			sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $index_page
354
                sed -i "s/\$service_SMS_status=\"true\";/\$service_SMS_status=\"false\";/g" $index_page
355
			sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
355
                sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
356
		else
356
            else
357
			echo "gammu is already stopped"
357
                echo "gammu is already stopped"
358
		fi
358
            fi
359
		exit 0 
359
        exit 0