2016-09-23

‎systemd service: let's add syslog support

← Older revision

Revision as of 05:06, 23 September 2016

(One intermediate revision by the same user not shown)

Line 97:

Line 97:

=== systemd service ===

=== systemd service ===

+

VLC's web interface can be started from systemd. First, we need to create a default user. We'll use UID 75 in this example since it's not in use according to [[DeveloperWiki:UID / GID Database]].



{{Note|''cvlc'' is the ''Console
VLC
Player'', or VLC without graphical interface.}}

+

# useradd -c "
VLC
daemon" -d / -G audio -M -p \! -r -s /bin/false -u 75 -U vlcd



{{Accuracy|{{ic|nobody}} is a valid user for daemons, should it still be changed?}}

+

Now we create
the
systemd service file:



+



Change
the
{{ic|1=User=}} parameter.

+

{{hc|/etc/systemd/system/vlc.service|<nowiki>

{{hc|/etc/systemd/system/vlc.service|<nowiki>

Line 111:

Line 110:

[Service]

[Service]

Type=forking

Type=forking



User=
nobody

+

User=
vlcd



ExecStart=/usr/bin/
cvlc
--
intf=lua
--
lua
-
intf=
http
--daemon
--http-port 8090

+

ExecStart=/usr/bin/
vlc
--
daemon
--
syslog
-
I
http --http-port 8090
--http-password</nowiki> ''password''<nowiki>

Restart=on-abort

Restart=on-abort

Line 118:

Line 117:

WantedBy=multi-user.target

WantedBy=multi-user.target

</nowiki>}}

</nowiki>}}

+

+

[[Start]] and [[enable]] {{ic|vlc.service}}. Log in to http://''yourmachine'':8090/ with no username and with the password you put in the service file.

== Troubleshooting ==

== Troubleshooting ==

Show more