Hello! I am trying to write a startup script that starts
a webserver (written in python).
The script starts the server if I run it manually after
boot, using: /etc/rc.d/twistd. It does not start automatically
when I boot the server! I have added it in /etc/rc.conf,
and "/etc/rc.d/twistd rcvar" returns "YES".
However, when I start it manually, it says: /etc/rc.d/twistd: DEBUG: pid file (/var/run/twistd.pid): not readable.
Here's the script:
a webserver (written in python).
The script starts the server if I run it manually after
boot, using: /etc/rc.d/twistd. It does not start automatically
when I boot the server! I have added it in /etc/rc.conf,
and "/etc/rc.d/twistd rcvar" returns "YES".
However, when I start it manually, it says: /etc/rc.d/twistd: DEBUG: pid file (/var/run/twistd.pid): not readable.
Here's the script:
Code:
#!/bin/sh
#
# PROVIDE: twistd
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
. /etc/rc.subr
name="twistd"
rcvar=`set_rcvar`
command="/usr/local/bin/${name}"
load_rc_config $name
ccg_enable=${ccg_enable-"NO"}
pidfile="/var/run/${name}.pid"
command_args="-y /usr/local/www/ccg.tac"
run_rc_command "$1"