Skip to content

Commit 9008e56

Browse files
authored
Merge pull request #168 from shelltime/claude/fix-shelltime-service-3UYQq
Fix shelltime service not running on Linux
2 parents a9b1490 + 3647289 commit 9008e56

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

model/daemon-installer.linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ func (l *LinuxDaemonInstaller) GetDaemonServiceFile(username string) (buf bytes.
166166
return
167167
}
168168
err = tmpl.Execute(&buf, map[string]string{
169-
"UserName": username,
169+
"UserName": username,
170+
"BaseFolder": l.baseFolder,
170171
})
171172
return
172173
}

model/sys-desc/shelltime.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ After=network.target
44

55
[Service]
66
Type=simple
7-
ExecStart=/bin/sh -c 'exec $(getent passwd $USER | cut -d: -f7) -l -c "{{.BaseFolder}}/bin/shelltime-daemon"'
7+
ExecStart=/bin/sh -c 'exec $(getent passwd $(id -un) | cut -d: -f7) -l -c "{{.BaseFolder}}/bin/shelltime-daemon"'
88
Restart=always
99

1010
# Resource limits

0 commit comments

Comments
 (0)