-
Notifications
You must be signed in to change notification settings - Fork 0
Fix shelltime service not running on Linux #168
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ After=network.target | |
|
|
||
| [Service] | ||
| Type=simple | ||
| ExecStart=/bin/sh -c 'exec $(getent passwd $USER | cut -d: -f7) -l -c "{{.BaseFolder}}/bin/shelltime-daemon"' | ||
| ExecStart=/bin/sh -c 'exec $(getent passwd $(id -un) | cut -d: -f7) -l -c "{{.BaseFolder}}/bin/shelltime-daemon"' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this change correctly fixes the issue with You can replace the complex shell invocation with a more direct command that uses |
||
| Restart=always | ||
|
|
||
| # Resource limits | ||
|
|
||
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 line correctly adds the
BaseFolderto the template data, fixing one of the bugs.However, as mentioned in my comment on
model/sys-desc/shelltime.service, the service file can be improved to use systemd's%hspecifier for the home directory. If you apply that suggestion,{{.BaseFolder}}will no longer be needed in the template, and this line can be removed.