-
Notifications
You must be signed in to change notification settings - Fork 5
/
vlc@.service
29 lines (26 loc) · 920 Bytes
/
vlc@.service
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
[Unit]
Description=VLC Audio Player
After=network.target
[Service]
Type=forking
User=vlc
PermissionsStartOnly=true
#ExecStartPre is required only if file logging is turned on
#ExecStartPre=-/bin/mkdir -p /var/log/vlc/
#ExecStartPre=-/bin/chown -R vlc /var/log/vlc/
#~vlc does not work, %h is not relevant, thus, using /home/vlc/
EnvironmentFile=/home/vlc/vlc-%i.svc
#dbus wants this, although it does not help
Environment=DISPLAY=:0
#Makes non-en file names readable in the browser
Environment=LANG=en_US.UTF-8
ExecStart=/usr/bin/vlc --daemon \
--pidfile /var/run/vlc-%i.pid \
--novideo --no-sout-video \
--intf http --http-port 909%i --http-password="${HTTP_PASSWORD}" --http-src /usr/share/vlc/lua/http/ \
--aout alsa --alsa-audio-device="${AUDIO_DEVICE}" \
# -vvv --extraintf=http:logger --file-logging --logfile=/var/log/vlc/vlc-%i.log
Restart=on-abort
RestartSec=10
[Install]
WantedBy=multi-user.target