summaryrefslogtreecommitdiff
path: root/docs/man/gammu-smsd.1
blob: 46bc1aa2873d2b74fe8b8e34d2b1bef2a2c5d8e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
.\" Man page generated from reStructuredText.
.
.TH "GAMMU-SMSD" "1" "Jun 18, 2017" "1.38.4" "Gammu"
.SH NAME
gammu-smsd \- SMS daemon for Gammu
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd [OPTION]...
.ft P
.fi
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.sp
This manual page documents briefly the \fBgammu\-smsd\fP command.
.sp
\fBgammu\-smsd\fP is a program that periodically scans GSM modem for
received messages, stores them in defined storage and also sends messages
enqueued in this storage.
.sp
The daemon can reload configuration file after sending hangup signal (SIGHUP)
and properly terminates itself on SIGINT and SIGTERM.
.sp
Program accepts following options (please note that long options might be not
accepted on some platforms):
.INDENT 0.0
.TP
.B \-h, \-\-help
Shows help.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-version
Shows version information and compiled in features.
.UNINDENT
.INDENT 0.0
.TP
.B \-c, \-\-config=file
Configuration file to use, default is /etc/gammu\-smsdrc, on Windows there
is no default and configuration file path has to be always specified.
.sp
If you run SMSD as a system daemon (or service), it is recommended to use
absolute path to configuration file as startup directory might be
different than you expect.
.sp
See gammu\-smsdrc for configuration file documentation.
.UNINDENT
.INDENT 0.0
.TP
.B \-p, \-\-pid=file
Lock file for storing pid, empty for no locking. Not supported on Windows.
.UNINDENT
.INDENT 0.0
.TP
.B \-U, \-\-user=user
Drop daemon privileges to chosen user after starting.
.UNINDENT
.INDENT 0.0
.TP
.B \-G, \-\-group=group
Drop daemon privileges to chosen group after starting.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-daemon
Daemonize program on startup. Not supported on Windows.
.UNINDENT
.INDENT 0.0
.TP
.B \-i, \-\-install\-service
Installs SMSD as a Windows service.
.UNINDENT
.INDENT 0.0
.TP
.B \-u, \-\-uninstall\-service
Uninstalls SMSD as a Windows service.
.UNINDENT
.INDENT 0.0
.TP
.B \-s, \-\-start\-service
Starts SMSD Windows service.
.UNINDENT
.INDENT 0.0
.TP
.B \-k, \-\-stop\-service
Stops SMSD Windows service.
.UNINDENT
.INDENT 0.0
.TP
.B \-f, \-\-max\-failures=count
Terminate after defined number of failures. Use 0 to not terminate (this is default).
.UNINDENT
.INDENT 0.0
.TP
.B \-X, \-\-suicide=seconds
Kills itself after number of seconds.
.UNINDENT
.INDENT 0.0
.TP
.B \-S, \-\-run\-service
Runs pogram as SMSD Windows service. This should not be used manually, but
only Windows Service manager should use this command.
.UNINDENT
.INDENT 0.0
.TP
.B \-n, \-\-service\-name=name
Defines name of a Windows service. Each service requires an unique name,
so if you want to run several SMSD instances, you have to name each
service differently. Default is "GammuSMSD".
.UNINDENT
.INDENT 0.0
.TP
.B \-l, \-\-use\-log
Use logging as configured in config file (default).
.UNINDENT
.INDENT 0.0
.TP
.B \-L, \-\-no\-use\-log
Do not use logging as configured in config file.
.UNINDENT
.INDENT 0.0
.TP
.B \-e, \-\-install\-event\-log
Installs Windows EventLog description to registry.
.sp
New in version 1.31.90.

.UNINDENT
.INDENT 0.0
.TP
.B \-E, \-\-uninstall\-event\-log
Uninstalls Windows EventLog description to registry.
.sp
New in version 1.31.90.

.UNINDENT
.SH SIGNALS
.sp
SMSD can be controlled using following POSIX signals (if your platform supports this):
.INDENT 0.0
.TP
.B SIGHUP
Reload configuration and reconnect to phone.
.TP
.B SIGINT, SIGTERM
Gracefully shutdown the daemon.
.TP
.B SIGALRM
Used internally for \fBgammu\-smsd \-X\fP
.TP
.B SIGUSR1
Suspends SMSD operation, closing connection to phone and database.
.TP
.B SIGUSR2
Resumes SMSD operation (after previous suspend).
.UNINDENT
.sp
Changed in version 1.22.91: Added support for SIGHUP.

.sp
Changed in version 1.22.95: Added support for SIGALRM.

.sp
Changed in version 1.31.90: Added support for SIGUSR1 and SIGUSR2.

.SH EXAMPLES
.SS Linux/Unix Examples
.sp
Start SMSD as a daemon on Linux:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd \-\-config /etc/gammu\-smsdrc \-\-pid /var/run/gammu\-smsd.pid \-\-daemon
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Start SMSD as a daemon on Linux with reduced privileges:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd \-\-config /etc/gammu\-smsdrc \-\-pid /var/run/gammu\-smsd.pid \-\-daemon \-\-user gammu \-\-group gammu
.ft P
.fi
.UNINDENT
.UNINDENT
.SS SMSD as a system wide daemon
.sp
To use SMSD as a daemon, you might want to use init script which is shipped
with Gammu in contrib/init directory. It is not installed by default, either
install it manually or check INSTALL file for instructions.
.sp
Under Windows 7 you might need to disable UAC (user account control) before
you will be able to install SMSD service.
.SS Windows Service Examples
.sp
Install Gammu SMSD Windows service:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd.exe \-c c:\eGammu\esmsdrc \-i
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Install two instances of SMSD Windows service:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd.exe \-c c:\eGammu\esmsdrc\-1 \-n Gammu\-first\-phone \-i

gammu\-smsd.exe \-c c:\eGammu\esmsdrc\-2 \-n Gammu\-second\-phone \-i
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To uninstall a Windows service:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd.exe \-u
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Troubleshooting Windows Service
.sp
If Gammu fails to start as a Windows service (you will usually get "Error
1053: The service did not respond to the start or control request in a timely
fashion"), first check your SMSD logs. If they do not contain any useful hint,
try starting SMSD manually with exactly same parameters as you installed the
service (without \-i).
.sp
For example the command line can look like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd.exe \-c smsdrc
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
You now should be able to get errors from SMSD even if it fails to start as a
service.
.SS Invoking Gammu and suspending SMSD
.sp
As you can not run Gammu and Gammu SMSD at same time on signle device, you can
workaround this limitation by suspending SMSD temporarily using \fISIGUSR1\fP and
\fISIGUSR2\fP signals (see also \fI\%Signals\fP):
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
SMSD_PID=\(gapidof gammu\-smsd\(ga
if [ \-z "$SMSD_PID" ] ; then
    echo "Failed to figure out SMSD PID!"
else
    kill \-SIGUSR1 $SMSD_PID
    gammu identify
    kill \-SIGUSR2 $SMSD_PID
fi
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Or even create a \fIgammu\-safe\fP script:
.SH KNOWN LIMITATIONS
.sp
You can not use same phone by more programs in same time. However in case you
did not enable locking in \fB[gammu]\fP section, it might be able
to start the communication with phone from more programs. In this case neither
of the programs will probably work, see \fI\%Invoking Gammu and suspending SMSD\fP for
workaround.
.sp
There is no way to detect that SMS message is reply to another by looking at
message headers. The only way to achieve this is to add some token to the
message and let the user include it in the message on reply.
.SH AUTHOR
Michal Čihař <michal@cihar.com>
.SH COPYRIGHT
2009-2015, Michal Čihař <michal@cihar.com>
.\" Generated by docutils manpage writer.
.