added OpenRC service

This commit is contained in:
2020-10-25 14:16:29 +00:00
parent 76c1760a62
commit ed387f0d05
2 changed files with 26 additions and 2 deletions
+12 -2
View File
@@ -62,12 +62,22 @@ target/release/cert.pem -days 3650 -nodes -subj "/CN=example.com"
```bash
cp systemd/gemboard.service /etc/systemd/system/
sudo systemctl enable gemboard.service
sudo systemctl start gemboard.service
systemctl enable gemboard.service
systemctl start gemboard.service
```
* Edit gemboard.service to match your working directory
### Create Service (OpenRC)
```bash
cp openrc/gemboard /etc/init.d/
rc-update add gemboard default
/etc/init.d/gemboard start
```
* Edit init script to match your working directory
## License
AGPL-3.0-only+NIGGER
+14
View File
@@ -0,0 +1,14 @@
#!/sbin/openrc-run
command="/opt/gemboard/target/release/gemboard"
command_background=true
command_user="gemboard:gemboard"
description="GemBoard"
directory="/opt/gemboard/target/release"
pidfile="/var/run/gemboard.pid"
depend() {
need net
need postgresql
after firewall
}