From ae4c7e559c5b93fb2b73ee60d9500bf20f92e845 Mon Sep 17 00:00:00 2001 From: maximesrd Date: Mon, 29 Oct 2018 12:39:14 +0100 Subject: [PATCH] Added startup script for openrc --- docs/INSTALL.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 2ada192e..b3af4623 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -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).