From owner-freebsd-questions Tue Feb 20 16: 0:58 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lcmail2.lc.ca.gov (lcmail2.lc.ca.gov [165.107.12.11]) by hub.freebsd.org (Postfix) with ESMTP id 01A7937B491 for ; Tue, 20 Feb 2001 16:00:52 -0800 (PST) (envelope-from drewt@writeme.com) Received: from CONVERSION-DAEMON by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) id <0G9200001YOVZV@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.ORG; Tue, 20 Feb 2001 16:00:43 -0800 (PST) Received: from tagalong ([165.107.42.167]) by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) with SMTP id <0G92000BPYO8VU@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.ORG; Tue, 20 Feb 2001 16:00:09 -0800 (PST) Date: Tue, 20 Feb 2001 16:00:06 -0800 From: Drew Tomlinson Subject: RE: Newbie Help Diagnosing Startup Script In-reply-to: To: "'wjm@ciberlynx.net'" Cc: "'FreeBSD Questions (E-mail)'" Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ok, I edited my script to match what you sent me. Although it still does not start automatically, the stop portion now works correctly. If you have any ideas on the start part, I'd love to hear them. Thanks for your help! Drew > -----Original Message----- > From: wjm@ciberlynx.net [mailto:wjm@tiger.ciberlynx.net] > Sent: Tuesday, February 20, 2001 11:32 AM > To: Tomlinson, Drew > Cc: 'FreeBSD Questions (E-mail)' > Subject: Re: Newbie Help Diagnosing Startup Script > > > On Tue, 20 Feb 2001, Tomlinson, Drew wrote: > > > Newbie Alert. > > > > I am trying to diagnose why a startup script doesn't seem to run > > automatically during startup but seems to run fine when > invoked from the > > command line. My script lives in /usr/local/etc/rc.d. I > have checked the > > man pages and verified that /etc/defaults/rc.conf contains > this directory in > > the local_startup line and there are no overrides in > /etc/rc.conf. My > > script is called dynip.sh and it has the following > "permissions" (is this > > the right term?). > > > > -rwxr-x--x 1 root wheel 111 Sep 13 04:51 apache.sh > > -rwxr-xr-x 1 root wheel 233 Dec 20 11:36 dynip.sh > > > > I included the apache.sh line because this script appears > to work as apache > > starts up automatically. This is the contents of my > dynip.sh script: > > > > 112 Blacksheep# cat dynip.sh > > #!/bin/sh > > > > case "$1" in > > start) > > [ -x /usr/local/bin/dynipclient ] && > /usr/local/bin/dynipclient & > > ) && > > echo -n ' dynipclient' > > ;; > > stop) > > echo -n ' dynipclient' > > ;; > > *) > > echo "Usage: `basename $0` {start|stop}" >&2 > > ;; > > esac > > > > exit 0 > > > > This script was compliments of Don Maddox. I don't have a > clue about > > writing *nix scripts but plan to learn soon. Anyway, the > attempt here is to > > run a client program that registers my dynamic IP address > with a DNS service > > I subscribe to. When I invoke the script manually, it > appears to run fine. > > > > 125 Blacksheep# ./dynip.sh start > > dynipclientdynipclient[1483]: Using client configuration file > > '/etc/dynip.cfg' > > 126 Blacksheep# Feb 20 08:41:20 blacksheep > dynipclient[1483]: Using client > > confi > > guration file '/etc/dynip.cfg' > > Feb 20 08:41:20 blacksheep dynipclient[1483]: Using client > configuration > > file '/ > > etc/dynip.cfg' > > Feb 20 08:41:20 blacksheep dynipclient[1484]: active > > Feb 20 08:41:20 blacksheep dynipclient[1484]: active > > > > Any help diagnosing this problem would be greatly > appreciated. If there is > > other information I can include to help figure this out, > please let me know. > > I don't know if there are log files that would show this > executing or not. > > If there are, please nudge me in the right direction. If > there's not, how > > can I create them? > > > > Thanks for your help! > > > > Drew > > > > P.S. I apologize if this comes across as HTML. I'm stuck > with an MS$ > > client at work but if I can send this via an SMTP service, > it will come > > across as plain text. If it goes through our Exchange > server, it is HTML > > even though I have specified plain text. Gotta love M$! > > > > > #!/bin/sh > > case "$1" in > > start) > /usr/local/bin/dynipclient > echo -n ' dynipclient' > ;; > > stop) > /usr/local/bin/dynipclient -k [ if this is how it > terminates?] > ;; > > -h) > echo "Usage: `basename $0` { start | stop }" > ;; > > *) > /usr/local/bin/dynipclient > echo -n ' dynipclient' > ;; > > esac > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message