~singpolyma/asterisk

ref: 1133eb1b6c28b0a2aabda8257f8d4afdab0c5b97 asterisk/contrib/asterisk.service -rw-r--r-- 1.4 KiB
1133eb1b — Tzafrir Cohen A systemd service 3 years ago
                                                                                
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
[Unit]
Description=Asterisk PBX
Documentation=man:asterisk(8)
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
ExecStart=__ASTERISK_SBIN_DIR__/asterisk -g -f -p -U asterisk
ExecReload=__ASTERISK_SBIN_DIR__/asterisk -rx 'core reload'
Restart=on-failure
RestartSec=1
WorkingDirectory=__ASTERISK_VARLIB_DIR__

# Extra settings:
# If you want to set them, you can add them to a file in the directory
# /lib/systemd/system/asterisk.service.d/ with the extension .conf.
# Example content:
#[Service]
#
# and following those two lines add directives or override existing
# directives. Some extra directives that may be useful:

# You can run a script to clean up after asterisk. An example script is
# included in contrib/scripts/asterisk_cleanup.
#ExecStopPost=/path/to/script

#Nice=0
#UMask=0002
#LimitCORE=infinity
#LimitNOFILE=

# safe_asterisk runs Asterisk in a virtual console. This allows easy
# access to the asterisk command-line without logging it. on the other
# hand, it allows anyone with physical access to the console full access
# to Asterisk. To enable this console, unrem the following lines and add
# '-c' to the ExecStart line above:
#TTYPath=/dev/tty9
#StandardInput=tty
#StandardOutput=tty
#StandardError=tty

# For more information on what these parameters mean see:
#
# http://0pointer.de/public/systemd-man/systemd.service.html
# http://0pointer.de/public/systemd-man/systemd.exec.html

[Install]
WantedBy=multi-user.target