I am setting up a gemini protocol server written in go called "molly brown" link to git repository.
I have placed its bianary file in /usr/local/sbin/molly-brown
I placed its initscript at /etc/rc.d/molly
This is its initscript:
I added
Here is my rc.conf
When I run
It is possible to start the server by going to /usr/local/sbin/molly-brown and typing
I am not sure what is going wrong. Please note that I am new to Freebsd and this forum.
I have placed its bianary file in /usr/local/sbin/molly-brown
I placed its initscript at /etc/rc.d/molly
This is its initscript:
Code:
#!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/s#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: molly
# REQUIRE: networking
# KEYWORD: shutdown
. /etc/rc.subr
name="molly"
desc="Gemini Protocol daemon"
rcvar="molly_enable"
command="/usr/local/sbin/molly-brown"
command_args="-c /etc/molly.conf"
molly_brown_user="daemon"
pidfile="/var/run/${name}.pid"
required_files="/etc/molly.conf"
start_cmd="molly_start"
stop_cmd="molly_stop"
status_cmd="molly_status"
molly_start() {
/usr/sbin/daemon -P ${pidfile} -r -f -u $molly_brown_user $command
}
molly_stop() {
if [ -e "${pidfile}" ]; then
kill -s TERM `cat ${pidfile}`
else
echo "${name} is not running"
fi
}
molly_status() {
if [ -e "${pidfile}" ]; then
echo "${name} is running as pid `cat ${pidfile}`"
else
echo "${name} is not running"
fi
}
load_rc_config $name
run_rc_command "$1"
I added
molly_enable="YES"
to /etc/rc.confHere is my rc.conf
Code:
hostname="coot"
ifconfig_DEFAULT="DHCP"
sshd_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
growfs_enable="YES"
pf_enable="YES"
pflog_enable="YES"
apache24_enable="YES"
ntpd_enable="YES"
molly_enable="YES"
When I run
service molly start
I get this output:
Code:
molly does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
It is possible to start the server by going to /usr/local/sbin/molly-brown and typing
molly-brown
I am not sure what is going wrong. Please note that I am new to Freebsd and this forum.