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
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
> [Service]
> Type=simple
That's the default, you can omit this.
> ExecStartPre=/bin/mkdir -p /run/couchdb
> ExecStartPre=/bin/chown couchdb:couchdb /run/couchdb
Replace this with RuntimeDirectory=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
ExecStart=/usr/bin/couchdb
> ExecStopPost=/bin/rm -rf /run/couchdb
Handled automatically by RuntimeDirectory, so drop.
> Restart=on-failure
>
> [Install]
> WantedBy=multi-user.target
So, all in all:
[Unit]
Description=System-wide CouchDB instance
Wants=network-online.target
After=network-online.target
[Service]
RuntimeDirectory=couchdb
User=couchdb
ExecStart=/usr/bin/couchdb
Restart=on-failure
[Install]
WantedBy=multi-user.target
** Also affects: couchdb (Ubuntu Wily)
Importance: Medium
Assignee: Jason Gerard DeRose (jderose)
Status: Confirmed
** Also affects: couchdb (Ubuntu Vivid)
Importance: Undecided
Status: New
** Changed in: couchdb (Ubuntu Wily)
Status: Confirmed => Triaged
** Changed in: couchdb (Ubuntu Vivid)
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1457464
Title:
Init fails to start CouchDB after upgrade to Vivid
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/couchdb/+bug/1457464/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs