[systemd-devel] Multiple template parameters for one service
Alexander Vladimirov
alexander.idkfa.vladimirov at gmail.com
Sat Jun 28 09:34:31 PDT 2014
%I specifier unescapes instance name, so
unison at path-to-profile.service instance becomes "path/to/profile"
Best regards,
Alexander
2014-06-29 0:31 GMT+08:00 Moviuro <moviuro at gmail.com>:
> On Sunday 29 June 2014 00:21:33 you wrote:
>> You could just use /etc/systemd/system/unison at instance.service.d/
>> directory to provide service environment variables, this seems to be
>> much more convenient way to configure service.
> I can't do that because different users may have the same profile name (and
> thus the same configuration folder).
>
> (I wanted to avoid it but, here is the unit)
> [Unit]
> Description=Unison sync for profile PROFILE
> Requires=reachable-retry at SERVER.service
> After=reachable-retry at SERVER.service
> [Service]
> User=LOCAL_USER
> ExecStart=/usr/bin/unison -auto -silent PROFILE
>
> I can't put the full path to the PROFILE as unison@/path/to/profile.service
> because I can't put '/' in a file name.
>
> Cheers,
> --
> Moviuro
More information about the systemd-devel
mailing list