<div dir="ltr">Thank you, that worked perfectly.<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 3, 2014 at 3:14 AM, Kirill Elagin <span dir="ltr"><<a href="mailto:kirelagin@gmail.com" target="_blank">kirelagin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That's how you do this in systemd:<br><a href="http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.tmpfiles.conf" target="_blank">http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.tmpfiles.conf</a><br>
<a href="https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.tmpfiles?h=packages/couchdb" target="_blank">https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.tmpfiles?h=packages/couchdb</a><br>
</div>
<div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div>--<br>Кирилл Елагин</div></div>
<br><br><div class="gmail_quote"><div><div class="h5">On Sat, May 3, 2014 at 12:03 PM, Austin Matherne <span dir="ltr"><<a href="mailto:austinmatherne@gmail.com" target="_blank">austinmatherne@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">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.<div>
<br></div><div>I took a peak at the files for Fedora (<a href="http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.service" target="_blank">http://pkgs.fedoraproject.org/cgit/couchdb.git/tree/couchdb.service</a>) and Arch (<a href="https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.service?h=packages/couchdb" target="_blank">https://projects.archlinux.org/svntogit/community.git/tree/trunk/couchdb.service?h=packages/couchdb</a>) to get an idea of what it should look like. I copied the service from Arch, as it looked particularly appropriate:</div>
<div><br></div><div><br></div><div><pre style="padding:0px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:13px"><code>[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</code></pre></div><div><br></div><div><br></div><div>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?</div>
<div><br></div><div>The original Gentoo init (<a href="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.init-4?view=markup" target="_blank">http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.init-4?view=markup</a>) and config (<a href="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.conf-2?view=markup" target="_blank">http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.conf-2?view=markup</a>) files for reference.</div>
<div><br></div><div>Any help with this would be greatly appreciated.</div><div><br></div><div>Thanks,</div><div>Austin</div></div>
<br></div></div>_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div>