init
This commit is contained in:
commit
acc61e858b
18 changed files with 5068 additions and 0 deletions
31
linux/systemd.md
Normal file
31
linux/systemd.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Systemd
|
||||
layout: default
|
||||
---
|
||||
|
||||
|
||||
Example with `kodi` : `/lib/systemd/system/kodi.service`
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description = Kodi Media Center
|
||||
After = remote-fs.target network-online.target
|
||||
Wants = network-online.target
|
||||
|
||||
[Service]
|
||||
User = pi
|
||||
Group = pi
|
||||
Type = simple
|
||||
ExecStart = /usr/bin/kodi-standalone
|
||||
; ExecStart = /usr/bin/su %i /usr/bin/kodi-standalone
|
||||
Restart = on-abort
|
||||
RestartSec = 5
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
```
|
||||
|
||||
```
|
||||
systemctl enable kodi
|
||||
systemctl start kodi
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue