commento 610 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/sh

# PROVIDE: commento
# REQUIRE: LOGIN postgresql
# KEYWORD: shutdown

PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"

. /etc/rc.subr

desc="Commento daemon"
name=commento
rcvar=commento_enable

load_rc_config $name

: ${commento_enable:=NO}

commento_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"
commento_user=www

command="/usr/local/bin/commento"
command_args=" >> /var/log/commento/${name}.log 2>&1 &"

run_rc_command "$1"