DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th September 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Thanked 3 Times in 3 Posts
Default Daemon Process not starting on boot

I'm trying to get a port called 'mongrel' to start on boot. I can start it after boot with the command:

# /usr/local/etc/rc.d/mongrel_cluster start

I've also put the following line in my /etc/rc.conf file
mongrel_cluster_enable=YES

Without this line I cannot start it manually. There is nothing in the log file 'messages' or 'mongrel.log' to suggest it's not starting correctly.

Am I just missing something easy here?
Is there more log files or documentation I'm overseeing?
Reply With Quote
  #2   (View Single Post)  
Old 8th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by map7 View Post
I'm trying to get a port called 'mongrel' to start on boot. I can start it after boot with the command:

# /usr/local/etc/rc.d/mongrel_cluster start

I've also put the following line in my /etc/rc.conf file
mongrel_cluster_enable=YES

Without this line I cannot start it manually. There is nothing in the log file 'messages' or 'mongrel.log' to suggest it's not starting correctly.

Am I just missing something easy here?
Is there more log files or documentation I'm overseeing?
IMO mongrel_cluster_enable=YES
should be
mongrel_cluster_enable= "YES"
Reply With Quote
  #3   (View Single Post)  
Old 9th September 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

Open the script "/usr/local/etc/rc.d/mongrel_cluster" with an editor or a viewer, you will find the variables you can put into your rc.conf.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #4   (View Single Post)  
Old 11th September 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Thanked 3 Times in 3 Posts
Default

I have done that but it doesn't start on boot.

Below is the whole mongrel_cluster file.

If I take mongrel_cluster_enable="YES" out of /etc/rc.conf then I cannot start it manually, ie: with the command '/usr/local/etc/rc.d/mongrel_cluster start'.



Code:
#!/bin/sh
# PROVIDE: mongrel_cluster
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# This script is modified by placing the following variables inside
# /etc/rc.conf.local, /etc/rc.conf, or /etc/rc.conf.d/mongrel_cluster:
#
# mongrel_cluster_enable (bool):
# 	Set it to YES to enable this service.
#	Default: NO
# mongrel_cluster_conf_dir (path):
# 	The directory containing the configuration file (*.yml) for each
#	application you want to control.
# 	Default: /usr/local/etc/mongrel_cluster

. /etc/rc.subr

name=mongrel_cluster
rcvar=${name}_enable

command="/usr/local/bin/mongrel_cluster_ctl"

load_rc_config $name

: ${mongrel_cluster_enable="NO"}
: ${mongrel_cluster_conf_dir="/usr/local/etc/mongrel_cluster"}

command_args="-c ${mongrel_cluster_conf_dir}"
start_cmd="mongrel_cmd start"
stop_cmd="mongrel_cmd stop"
restart_cmd="mongrel_cmd restart"
status_cmd="mongrel_cmd status"

mongrel_cmd()
{
    if [ ! -d "${mongrel_cluster_conf_dir}/." ]; then
			warn "${mongrel_cluster_conf_dir} is not a directory."
			return 1
    fi
    ${command} $1 ${mongrel_cluster_flags} ${command_args} 2>&1 | grep -v "procfs"
}

run_rc_command "$1"
Reply With Quote
  #5   (View Single Post)  
Old 11th September 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Quick way to figure out the rc.conf directive:
% /usr/local/etc/rc.d/mongrel_cluster rcvar

Anyway, it sounds like you've already got it, since you can start the service manually. If it's not starting at boot time, it's possible there is another service it depends on that is not yet up. I'm not familiar with mongrel -- what does it rely on to start properly? You may need to fix the REQUIRE line.

---------------

P.S. Check the tail of of this command to look for clues about why it may not be starting:
% dmesg -a | less
__________________
Kill your t.v.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Named not starting on NetBSD boot Antimidget NetBSD General 2 27th August 2009 10:57 PM
See what process is generating DNS traffic? Bruco FreeBSD General 3 2nd July 2009 05:57 PM
shell script-start another process bsdnewbie999 Programming 2 23rd April 2009 07:48 PM
How can I start xscreensaver daemon at boot rex FreeBSD General 7 15th May 2008 02:34 PM
Samba NOT STARTING pcfxer FreeBSD General 11 13th May 2008 09:29 AM


All times are GMT. The time now is 02:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick