yaws/yaws@.service
Antoine Catton 6da4624fc6 Rename unit file to allow instance specification
The provided unit files uses the instance name for the configuration
file (%i), allowing the user to run:
  # systemctl start yaws@example.service

This feature needs the unit file to end by an at sign.

Signed-off-by: Antoine Catton <devel@antoine.catton.fr>
2015-06-19 08:48:28 +02:00

17 lines
532 B
Desktop File

[Unit]
Description=The Yaws Web Server instance
After=network.target
[Service]
User=root
Type=notify
Environment="HOME=/var/lib/yaws"
# We need to use --daemon and Type=forking, otherwise it would spawn the
# Erlang shell that terminates upon attempt to read from /dev/null input :(
Type=forking
ExecStart=/usr/bin/yaws --daemon --conf /etc/yaws/%i.conf
ExecReload=/usr/bin/echo /usr/bin/yaws --hup --conf /etc/yaws/%i.conf
ExecStop=/usr/bin/echo /usr/bin/yaws --stop --conf /etc/yaws/%i.conf
[Install]
WantedBy=multi-user.target