systemd unit example #1611

Closed
opened 2026-02-20 04:16:32 -05:00 by deekerman · 6 comments
Owner

Originally created by @Taloth on GitHub (Jul 28, 2017).

@untoreh

I just noticed your changed to the systemd unit example, even though it was a couple of weeks ago:

https://github.com/Sonarr/Sonarr/wiki/Autostart-on-Linux/_compare/4903e93095e0e9e5efa0782a56655034591671f1...7cf87655efa014b44a80ea52dfeeaf628c62ec0d#diff-1f798ffb8093a81af913ecf9128a2be0R225

Personally I think this is a bad choice:
The change assumes that the specified user exists, and assumes that the user home folder is located there, and has the username located in several locations of the file.
Further more, Sonarr already creates the directory as needed which should go fine since the user should have write permissions in their own home directory.
As such, I believe the ExecStartPre commands are superfluous and error prone.

I'm opening this issue in the hopes of getting a response, otherwise I'll revert the change after a while.

Originally created by @Taloth on GitHub (Jul 28, 2017). @untoreh I just noticed your changed to the systemd unit example, even though it was a couple of weeks ago: https://github.com/Sonarr/Sonarr/wiki/Autostart-on-Linux/_compare/4903e93095e0e9e5efa0782a56655034591671f1...7cf87655efa014b44a80ea52dfeeaf628c62ec0d#diff-1f798ffb8093a81af913ecf9128a2be0R225 Personally I think this is a bad choice: The change assumes that the specified user exists, and assumes that the user home folder is located there, and has the username located in several locations of the file. Further more, Sonarr already creates the directory as needed which should go fine since the user should have write permissions in their own home directory. As such, I believe the ExecStartPre commands are superfluous and error prone. I'm opening this issue in the hopes of getting a response, otherwise I'll revert the change after a while.
deekerman 2026-02-20 04:16:32 -05:00
  • closed this issue
  • added the
    docs
    label
Author
Owner

@ghost commented on GitHub (Jul 29, 2017):

sonarr was failing to start because wasn't creating such folder, systemd behaves in a manner that vars substitution within ExecStartPre with elevated privileges are relative to root and not User= . The username is the one used in the package (ubuntu at least). This stuff should probably belong in the packages

@ghost commented on GitHub (Jul 29, 2017): sonarr was failing to start because wasn't creating such folder, systemd behaves in a manner that vars substitution within `ExecStartPre` with elevated privileges are relative to root and not `User=` . The username is the one used in the package (ubuntu at least). This stuff should probably belong in the packages
Author
Owner

@Taloth commented on GitHub (Jul 29, 2017):

sonarr was failing to start because wasn't creating such folder

I think that's something to be investigated, chances are the home directory wasn't created or had the wrong permissions.

systemd behaves in a manner that vars substitution within ExecStartPre with elevated privileges are relative to root and not User=

I know, but using absolute paths there is just a workaround, and as I said error prone.

The username is the one used in the package (ubuntu at least).

Afaik the package has no username.

This stuff should probably belong in the packages

We're planning to do so in v3 together with the package rename to Sonarr, but we can't do that now.

The changes you made are specific for one environment, however Sonarr is installed on many different OSes which have different locations for mono, user homes etc, including seedboxes, NAS'.

@Taloth commented on GitHub (Jul 29, 2017): > sonarr was failing to start because wasn't creating such folder I think that's something to be investigated, chances are the home directory wasn't created or had the wrong permissions. > systemd behaves in a manner that vars substitution within ExecStartPre with elevated privileges are relative to root and not User= I know, but using absolute paths there is just a workaround, and as I said error prone. > The username is the one used in the package (ubuntu at least). Afaik the package has no username. > This stuff should probably belong in the packages We're planning to do so in v3 together with the package rename to Sonarr, but we can't do that now. The changes you made are specific for one environment, however Sonarr is installed on many different OSes which have different locations for mono, user homes etc, including seedboxes, NAS'.
Author
Owner

@ghost commented on GitHub (Jul 29, 2017):

I think that's something to be investigated, chances are the home directory wasn't created or had the wrong permissions.

iirc sonarr assumes .config/ is already present

Afaik the package has no username.

you're right, it is used here

The changes you made are specific for one environment, however Sonarr is installed on many different OSes which have different locations for mono, user homes etc, including seedboxes, NAS'.

yes although I figured since the script already required manual editing, offering a working example wouldn't hurt, anyway change as you want

@ghost commented on GitHub (Jul 29, 2017): > I think that's something to be investigated, chances are the home directory wasn't created or had the wrong permissions. iirc sonarr assumes `.config/` is already present > Afaik the package has no username. you're right, it is used [here ](https://github.com/Sonarr/Sonarr/wiki/Autostart-on-Debian) >The changes you made are specific for one environment, however Sonarr is installed on many different OSes which have different locations for mono, user homes etc, including seedboxes, NAS'. yes although I figured since the script already required manual editing, offering a working example wouldn't hurt, anyway change as you want
Author
Owner

@markus101 commented on GitHub (Dec 4, 2017):

@Taloth can we clean this up and close?

@markus101 commented on GitHub (Dec 4, 2017): @Taloth can we clean this up and close?
Author
Owner

@Taloth commented on GitHub (Dec 5, 2017):

I rather move it to the v3 milestone (since the v3.0 installer should include the appropriate unit file)

@Taloth commented on GitHub (Dec 5, 2017): I rather move it to the v3 milestone (since the v3.0 installer should include the appropriate unit file)
Author
Owner

@markus101 commented on GitHub (Jun 3, 2018):

systemd file will be included with eh debian package (and any other packages we add).

@markus101 commented on GitHub (Jun 3, 2018): systemd file will be included with eh debian package (and any other packages we add).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Sonarr#1611
No description provided.