washed / drempelbox

0 stars 0 forks source link

Use specifier %u in service file to determine current user #18

Closed tmh-alex closed 6 months ago

tmh-alex commented 8 months ago

Had the problem that the services existed with status=217/USER. This was due to the hardcoded user in the service definition that doesn't exist on my machine. Replacing the username with the %u specifier seems to the issue.

However... The service now runs as root, I'm so far not sure if this doesn't entail adverse effects. Keeping it as a draft PR for now and would appreciate feedback.

washed commented 8 months ago

yeeah hardcoding my username probably wasn't one of my greatest deeds ever :) we could think about registering it for a specific user, as a user service (needs arguments when registering it with systemd). Maybe we should have a separate, standard user for the app?

tmh-alex commented 8 months ago

Dedicated user seems to be the cleanest solution, allows for cleaner group management.

washed commented 8 months ago

Accidentally marked this as ready for review and can't undo on mobile apparently.

washed commented 6 months ago

I discovered we need a dedicated user for proper shutdown permissions. I will implement this as part of #15

tmh-alex commented 6 months ago

@washed Merge anyway even though you're working on a better solution?

washed commented 6 months ago

Either merge or close. Either way is fine with me! #15 obsoletes this mostly, though, there is just one question left about the UID (currently hard coded)