That's how you do this in systemd: http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.tmpfiles.conf https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.tmpfiles?h=packages/couchdb
-- Кирилл Елагин On Sat, May 3, 2014 at 12:03 PM, Austin Matherne <austinmathe...@gmail.com>wrote: > I switched my Gentoo install over to systemd today and pretty much > everything worked flawlessly. The only exception was CouchDB, which lacks > systemd support in Portage, so I'm left writing my own service file. > > I took a peak at the files for Fedora ( > http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.service) and > Arch ( > https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.service?h=packages/couchdb) > to get an idea of what it should look like. I copied the service from Arch, > as it looked particularly appropriate: > > > [Unit] > Description=CouchDB Server > > [Service] > User=couchdb > Type=forking > PermissionsStartOnly=true > ExecStart=/usr/bin/couchdb -b -o /dev/null -e /dev/null > ExecStop=/usr/bin/couchdb -d > > [Install] > WantedBy=multi-user.target > > > > However, there's a problem with this implementation. The original Gentoo > init script created the folder /var/run/couchdb with the correct > permissions for user couchdb at runtime using a helper > function (checkpath). How can I do this with a systemd service? > > The original Gentoo init ( > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.init-4?view=markup) > and config ( > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.conf-2?view=markup) > files for reference. > > Any help with this would be greatly appreciated. > > Thanks, > Austin > > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel > >
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel