service file docs?
Michael Biebl
biebl at debian.org
Fri Jun 6 23:21:39 BST 2014
Am 06.06.2014 13:56, schrieb Michael Meskes:
> Hi Michael,
>
>> I think it’d be better if you posted what you already have and what
>> problem you are trying to solve.
>
> Sure, no problem. Here's what I have:
>
> ---
> [Unit]
> Description=Check And Enable File System Quotas
> Documentation=man:quotaon(8)
> DefaultDependencies=no
> After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
This is a bit odd.
> Before=local-fs.target shutdown.target
Why the shutdown.target here? And do you really want to run the quota
script *before* the local file systems have been mounted?
> ConditionPathExists=/usr/share/quota/quotaon.sh
That seems unnecessary.
Since the service file is in /lib, it will be removed along with the
quotaon.sh script. So I don't see the need to explicitly test for it.
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/usr/share/quota/quotaon.sh
> ExecStop=/usr/share/quota/quotaoff.sh
> StandardOutput=journal+console
Is there a need to divert from the default StandardOutput setting?
>
> [Install]
> WantedBy=sysinit.target
> ---
>
> AFAICT this works nicely on boot and on manual invocation after deactivating
> the systemd provided quotaon.service. What I'm trying to figure out is how to
> make sure my stop script gets called upon rebooting or halting.
If you have DefaultDependencies=no and you want to have your service
stopped on shutdown, add
Conflicts=shutdown.target
> Also I have to figure out whether to integrate the logic of the systemd
> provided quotacheck.service and if so, how to. But first I got to get it
> running.
I think what's important is to avoid duplicating any functionality
between what is already provided by systemd.
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140607/6c3305ea/attachment-0002.sig>
More information about the Pkg-systemd-maintainers
mailing list