Please drop the "the" and start with a capital letter for some consistency.
> After=network-online.target
Is that really necessary? I. e. couchdb doesn't get along with new network
interfaces coming up after boot? Note that this is mostly a workaround, and
won't do anything if you e. g. hotplug/enable/connect to a new network during
runtime.
If you need it, you also need a corresponding Wants=network-online.target
Of course, if you have a proper systemd unit that's always better. But some suggestions:
> [Unit]
> Description=the system-wide CouchDB instance
Please drop the "the" and start with a capital letter for some consistency.
> After=network- online. target
Is that really necessary? I. e. couchdb doesn't get along with new network enable/ connect to a new network during
interfaces coming up after boot? Note that this is mostly a workaround, and
won't do anything if you e. g. hotplug/
runtime.
If you need it, you also need a corresponding Wants=network- online. target
> [Service]
> Type=simple
That's the default, you can omit this.
> ExecStartPre= /bin/mkdir -p /run/couchdb /bin/chown couchdb:couchdb /run/couchdb
> ExecStartPre=
Replace this with RuntimeDirector y=couchdb (see man systemd.exec)
> ExecStart=/bin/su couchdb -c /usr/bin/couchdb
Don't use su, that'll go through the PAM stack etc. Use this instead:
User=couchdb /usr/bin/ couchdb
ExecStart=
> ExecStopPost= /bin/rm -rf /run/couchdb
Handled automatically by RuntimeDirectory, so drop.
> Restart=on-failure multi-user. target
>
> [Install]
> WantedBy=
So, all in all:
[Unit] System- wide CouchDB instance online. target online. target
Description=
Wants=network-
After=network-
[Service] y=couchdb /usr/bin/ couchdb
RuntimeDirector
User=couchdb
ExecStart=
Restart=on-failure
[Install] multi-user. target
WantedBy=