I've been fighting with some script conversion to systemd and I
think a reasonnably complex exemple should be of great help. I've
been trying to convert minidlna sysv init file to systemd, managed
to have a working unit file but failed to split the configuration
mimicing the ../default/minidlna content with the hability to make
USER and GROUP configurable. Each time iI try to use: [Unit] Description=MiniDLNA is a DLNA/UPnP-AV server software After=local-fs.target network.target [Service] EnvironmentFile=./etc/default/minidlna.conf.sysd User=$USER_MINIDLNA (defined in the environment file) Group=$GROUP_MINIDLNA (idem) Type=simple # drop root just before ExecStart to allow ExecStartPre to run as root PermissionsStartOnly=true #command that still needs root priviledge ExecStartPre=/bin/mkdir -p /var/run/minidlna ExecStartPre=/bin/chown $USER /var/run/minidlna ExecStart=/usr/sbin/minidlnad -S [Install] WantedBy=multi-user.target I get an error that is due to User setting. Putting a known user works!!! I have tryed USER_MINIDLNA=minidlna with or without quote as well as $USER_MINIDLNA or ${USER_MINIDLNA} Thanks for the guide anyway. -- eric -- To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/546b6926.9070...@free.fr |
- init system policy Anthony Towns
- Re: init system policy Anthony Towns
- Re: init system policy Simon McVittie
- Re: Re: init system policy Eric Valette
- Re: init system policy Matthias Urlichs
- Re: init system policy Eric Valette