Subversion Repositories ALCASAR

Rev

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

Rev 1502 Rev 1606
Line 334... Line 334...
334
		echo "$usage"
334
		echo "$usage"
335
		exit 0
335
		exit 0
336
		;;
336
		;;
337
	--start)
337
	--start)
338
		gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
338
		gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
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
360
		;;
360
        ;;
361
	--pidof)
361
	--pidof)
362
		/sbin/pidof gammu-smsd
362
		/sbin/pidof gammu-smsd
363
		;;
363
		;;
364
	--last_nosim)
364
	--last_nosim)
365
		# Récupère la dernière ligne où NOSIM est présent (error)
365
		# Récupère la dernière ligne où NOSIM est présent (error)