mirror of
https://github.com/myned/modufur.git
synced 2024-12-23 22:27:27 +00:00
Fix relative path in systemd service file
This commit is contained in:
parent
405e75c05f
commit
d3eac3979c
2 changed files with 8 additions and 4 deletions
10
README.md
10
README.md
|
@ -56,15 +56,19 @@ cd Modufur
|
|||
```
|
||||
cp modufur.service ~/.config/systemd/user
|
||||
```
|
||||
3. Reload user daemon
|
||||
3. Replace `user` in `WorkingDirectory` with current user
|
||||
```
|
||||
sed -i "s|\(WorkingDirectory=/home/\)user|\1$(whoami)|" ~/.config/systemd/user/modufur.service
|
||||
```
|
||||
4. Reload user daemon
|
||||
```
|
||||
systemctl --user daemon-reload
|
||||
```
|
||||
4. Start and enable service on login
|
||||
5. Start and enable service on login
|
||||
```
|
||||
systemctl --user enable --now modufur
|
||||
```
|
||||
5. Enable lingering to start user services on boot
|
||||
6. Enable lingering to start user services on boot
|
||||
```
|
||||
sudo loginctl enable-linger username
|
||||
```
|
||||
|
|
|
@ -4,7 +4,7 @@ Requires=default.target
|
|||
After=default.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=~/.git/Modufur
|
||||
WorkingDirectory=/home/user/.git/Modufur
|
||||
ExecStart=poetry run python -OO run.py >&2
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in a new issue