Skip to content

Commit 356f6d1

Browse files
authored
Merge pull request #130 from shelltime/update-service-descriptors
feat(daemon): update service descriptors for systemd and launchctl
2 parents 4aae706 + ea63e31 commit 356f6d1

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

model/sys-desc/shelltime.service

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

55
[Service]
66
Type=simple
7-
ExecStart=/usr/local/bin/shelltime-daemon
7+
ExecStart=/bin/sh -c 'exec $(getent passwd username | cut -d: -f7) -l -c "/usr/local/bin/shelltime-daemon"'
88
Restart=always
99

10+
# Resource limits
11+
LimitNOFILE=65536
12+
13+
# Logging
14+
StandardOutput=journal
15+
StandardError=journal
16+
1017
[Install]
1118
WantedBy=default.target

model/sys-desc/xyz.shelltime.daemon.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
<string>xyz.shelltime.daemon</string>
77
<key>ProgramArguments</key>
88
<array>
9-
<string>{{.BaseFolder}}/bin/shelltime-daemon</string>
9+
<string>/bin/sh</string>
10+
<string>-c</string>
11+
<string>exec $SHELL -l -c '{{.BaseFolder}}/bin/shelltime-daemon'</string>
1012
</array>
1113
<key>RunAtLoad</key>
1214
<true/>

0 commit comments

Comments
 (0)