Added startup script for openrc
This commit is contained in:
parent
0bb2e6293a
commit
ae4c7e559c
@ -494,6 +494,54 @@ exit 0
|
||||
|
||||
```
|
||||
|
||||
Now start the services:
|
||||
|
||||
```bash
|
||||
service plume.service start
|
||||
```
|
||||
|
||||
|
||||
And check:
|
||||
|
||||
```bash
|
||||
service plume.service status
|
||||
```
|
||||
|
||||
## OpenRC integration
|
||||
|
||||
This script can also be useful if you are using OpenRC.
|
||||
|
||||
```bash
|
||||
#! /sbin/openrc-run
|
||||
name="plume"
|
||||
description="plume : federated blogging"
|
||||
pidfile=/run/plume
|
||||
start() {
|
||||
ebegin "Starting plume"
|
||||
start-stop-daemon -v --start --exec "/home/plume/.cargo/bin/cargo run" --user "plume" --chdir "/home/plume/Plume" --background --stdout "/var/log/plume.log" --stderr "/var/log/plume.err" --make-pidfile --pidfile "/run/plume" -- "phx.server"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping plume"
|
||||
start-stop-daemon --stop --user "plume" --chdir "/home/plume/Plume" --pidfile "/run/plume"
|
||||
eend $?
|
||||
}
|
||||
```
|
||||
Now you need to enable all of these services:
|
||||
|
||||
```bash
|
||||
rc-update add plume
|
||||
```
|
||||
|
||||
Now start the services:
|
||||
|
||||
```bash
|
||||
/etc/init.d/plume start
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Caveats:
|
||||
|
||||
- Pgbouncer is not supported yet (named transactions are used).
|
||||
|
Loading…
Reference in New Issue
Block a user