[systemd-devel] Unit File: Create Folder With User Permissions
Austin Matherne
austinmatherne at gmail.com
Sat May 3 01:31:15 PDT 2014
Thank you, that worked perfectly.
On Sat, May 3, 2014 at 3:14 AM, Kirill Elagin <kirelagin at gmail.com> wrote:
> 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 <austinmatherne at 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 at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140503/2a6f2000/attachment.html>
More information about the systemd-devel
mailing list