-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove sh -c #1517
Remove sh -c #1517
Conversation
Remove `sh -c`
Update directory address
@@ -8,7 +8,7 @@ Type=simple | |||
Restart=always | |||
RestartSec=1 | |||
User=jamulus | |||
ExecStart=/bin/sh -c '/usr/bin/jamulus -s -n -l /var/log/jamulus -e jamulus.fischvolk.de -g -o "$(uname -n);;"' | |||
ExecStart=/usr/bin/jamulus -s -n -l /var/log/jamulus -e anygenre1.jamulus.io:22124 -g -o "$(uname -n);;" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect $(uname -n)
will not expand properly without the sh -c
wrap. This would likely need the exec
as @softins suggested (haven't tried myself):
ExecStart=/usr/bin/jamulus -s -n -l /var/log/jamulus -e anygenre1.jamulus.io:22124 -g -o "$(uname -n);;" | |
ExecStart=/bin/sh -c 'exec /usr/bin/jamulus -s -n -l /var/log/jamulus -e anygenre1.jamulus.io:22124 -g -o "$(uname -n);;"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect it to be OK since it's not a sh
only thing. Putting sh -c
back here will cause the problem with SIGUSR2, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of the second file. @hoffie suggested change will work. I already tested it with SIGUSR2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I read https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers correctly
ExecStart=/usr/bin/jamulus -s -n -l /var/log/jamulus -e anygenre1.jamulus.io:22124 -g -o %H
would work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for me. And will be consistent with the wiki documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel strongly that the correct solution is to retain the sh -c
and add the exec
.
@softins I see you're going to do that so I'll close this. |
As per #1515 (comment)