From 2527fbec55d66a25a4004051afd62a028a1362bb Mon Sep 17 00:00:00 2001 From: Pierre-Alain TORET Date: Sat, 9 Jun 2018 21:54:30 +0200 Subject: [PATCH] commento_ce: add rc style init script Signed-off-by: Pierre-Alain TORET --- etc/bsd-rc/commento_ce | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 etc/bsd-rc/commento_ce diff --git a/etc/bsd-rc/commento_ce b/etc/bsd-rc/commento_ce new file mode 100755 index 0000000..89fd72a --- /dev/null +++ b/etc/bsd-rc/commento_ce @@ -0,0 +1,28 @@ +#!/bin/sh + +# PROVIDE: commento_ce +# REQUIRE: LOGIN postgresql +# KEYWORD: shutdown + +PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" + +. /etc/rc.subr + +desc="Commento CE daemon" +name=commento_ce +rcvar=commento_ce_enable + +load_rc_config $name + +: ${commento_ce_enable:=NO} + +commento_ce_env="COMMENTO_ORIGIN=https://commento.example.com \ +COMMENTO_PORT=8080 \ +COMMENTO_POSTGRES=postgres://commento:commento@db:5432/commento?sslmode=disable \ +COMMENTO_STATIC=/usr/local/share/commento-ce" +commento_ce_user=www + +command="/usr/local/bin/commento-ce" +command_args=" >> /var/log/commento_ce/${name}.log 2>&1 &" + +run_rc_command "$1"