mistermanko
Guru
- Joined
- Jan 27, 2020
- Messages
- 577
Making Etherpad run a jail locally is straight forward.
install git npm and node, clone the git, run.sh and you're good.
Now I'm struggling to have it start and run as a service. So far I've put together this rc.d script which is not working:
I'd appreciate some ideas?
install git npm and node, clone the git, run.sh and you're good.
Now I'm struggling to have it start and run as a service. So far I've put together this rc.d script which is not working:
Code:
#!/bin/sh
#
# PROVIDE: etherpad
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable etherpad:
#
# etherpad_enable="YES"
#
. /etc/rc.subr
name="etherpad"
rcvar=${name}_enable
start_cmd="${name}_start"
#stop_cmd="${name}_stop"
load_rc_config $name
etherpad_user="etherpad"
procname="java"
pidfile=/var/run/etherpad/etherpad.pid
daemon_args=" -c -f /usr/local/www/etherpad-lite/src/bin/run.sh"
etherpad_start()
{
su -l ${etherpad_user} -c "/usr/sbin/daemon ${daemon_args}"
}
run_rc_command "$1"
I'd appreciate some ideas?