[aur-general] [arch-dev-public] [REMINDER] systemd conversion

Tom Gundersen teg at jklm.no
Thu Oct 4 15:10:46 EDT 2012


On Thu, Oct 4, 2012 at 8:58 PM, Matthew Monaco <dgbaley27 at 0x01b.net> wrote:
> This will do what rc.d/webfsd does with conf.d/webfsd:
> webfsd.service ---------------------------------------------------------
> [Unit]
> Description=webfsd
> Documentation=man:webfsd(1)
> After=network.target
>
> [Service]
> ExecStart=/usr/bin/webfsd -p 8080 -u nobody -R /srv/http -f index.html -F
>
> [Install]
> WantedBy=multi-user.target
>
>
> But I think an EnvironmentFile is useful for this service as it only takes
> config on the command line.
> webfsd at .service --------------------------------------------------------
> [Unit]
> Description=webfsd
> Documentation=man:webfsd(1)
> After=network.target
>
> [Service]
> EnvironmentFile=/etc/webfs/%i.conf
> ExecStart=/usr/bin/webfsd $WEBFSD_ARGS -F
>
> [Install]
> WantedBy=multi-user.target

It depends on the service/daemon of course, so there might be a case
for doing this. I would say to keep it simple in general (the first
file you pasted), but if it turns out that there is no way to make it
generic enough (e.g., in the case of domainname literally every admin
would need to tweak the file), then using EnvFile might make sense.

I would, however, really resist using instances of config files as you
did here, unless that is really a common scenario (I don't know this
software at all, so might be). Let's keep it simple :-)

-t


More information about the aur-general mailing list