Skip to content

Commit

Permalink
systemd example
Browse files Browse the repository at this point in the history
  • Loading branch information
ferama committed Nov 26, 2023
1 parent bf76fe4 commit 6bea0a8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
17 changes: 17 additions & 0 deletions hack/systemd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# systemd

Here an example on how to setup rospo for a given
user as a systemd unit

## prerequisites

Install homebrew

```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Install rospo
```sh
brew install rospo
```
20 changes: 20 additions & 0 deletions hack/systemd/rospo.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# put this in /etc/systemd/system/rospo.service
# sudo systemctl daemon-reload
# sudo systemctl start rospo

[Unit]
Description=Rospo
After=network.target auditd.service

[Service]
WorkingDirectory=/home/<rospo_user>
ExecStart=/home/linuxbrew/.linuxbrew/bin/rospo run /etc/rospo/rospo.yaml
KillMode=process
User=<rospo_user>
Group=<rospo_user>
Restart=on-failure
Type=simple

[Install]
WantedBy=multi-user.target
Alias=rospo.service

0 comments on commit 6bea0a8

Please sign in to comment.