Kamis, 21 Maret 2013

Membangun SMS Gateway dengan linux


$ nano /etc/gammu-smsdrc

# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
[gammu]
# Please configure this!
port = /dev/ttyUSB0
connection = at115200
# Debugging
#logformat = textall
#PIN = 1234
commtimeout = 1
sendtimeout = 10
# SMSD configuration, see gammu-smsdrc(5)
[smsd]
service = mysql
logfile = /var/log/smsdlog
# Increase for debugging information
debuglevel = 0
checksecurity = 0
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/
user = root
password = dbajib123456
pc = localhost
database = ajib
untuk menjalankan sms daemon pada startup letakkan perintah berikut pada rc.local

$ nano /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#untuk menjalankan lampp saat startup
/opt/lampp/lampp start 
 #untuk menjalankan gammu sms daemon
ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon
#untuk mematikan pc pada waktu yang ditentukan
shutdown -h -P 20:00

exit 0
 untuk mengecek apakah gammu sms gateway telah berjalan dengan baik
$ gammu-smsd
Keluargayahyaakhyar Web Developer

Morbi aliquam fringilla nisl. Pellentesque eleifend condimentum tellus, vel vulputate tortor malesuada sit amet. Aliquam vel vestibulum metus. Aenean ut mi aucto.

Tidak ada komentar:

Posting Komentar