DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd January 2013
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default starting tor + polipo?

Sorry if I have to ask this here as I still have a restricted account.
I hope someone will help me figure out the difference between case1 and case2 and which is more correct :
1- Autostart tor+polipo by putting a line in /etc/rc.conf.local that reads : pkg_scripts="tor polipo"

2- Autostart the pair by putting lines in /etc/rc.local :

#Start tor
if [ -x /usr/local/bin/tor ]; then
echo -n ' tor'
/usr/local/bin/tor
fi

#Start Polipo
if [ -x /usr/local/bin/polipo ]; then
echo -n ' polipo'
/usr/local/bin/polipo
fi
Reply With Quote
  #2   (View Single Post)  
Old 23rd January 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Hello and welcome! Either case is perfectly acceptable but case 1 is much much easier to configure and maintain.
Reply With Quote
  #3   (View Single Post)  
Old 23rd January 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

The first method using the pkg_scripts variable is the modern way. This assumes that the ports or packages installed a script for /etc/rc.d

The second method, using scripts in /etc/rc.local is the "old" way. See http://www.openbsd.org/faq/faq10.html#rc
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #4   (View Single Post)  
Old 23rd January 2013
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

Quote:
This assumes that the ports or packages installed a script for /etc/rc.d
and when they don't ? OpenBSD autocreates the scripts unlike for example in NetBSD.if it doesn't then I can only start the application not the daemon.Am I right ?
Reply With Quote
  #5   (View Single Post)  
Old 23rd January 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

OpenBSD does not "autocreate" rc.d scripts. The rc.d infrastructure was added for OpenBSD 4.9 and then enhanced for 5.0; the enhancements included simplified deployment of these scripts for port maintainers.

It is my understanding that most ports (and their packages) that have daemons will install scripts in rc.d. I say most because it is not impossible that a little used port may have been missed.

Should you come across a package with a daemon that does not have an rc.d script, please feel free to contact the $MAINTAINER to discuss. There may be a special requirement not met by rc.d infrastructure. If you get no response or if there is no port $MAINTAINER on record -- the ports' Makefile is where to look -- you may ask the ports@ mailing list.
Reply With Quote
  #6   (View Single Post)  
Old 23rd January 2013
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

Much thanks to you jggimi,j65nko for the clarification.

Code:
sabnzbd-0.7.0: ok
--- +sabnzbd-0.7.0 -------------------
Start the sabnzbd daemon by /usr/local/bin/sabnzbd and do the initial
configuration via http://localhost:8080/
I thought daemons' home is /etc/rc.d/ and that 'daemonise' involves /etc/rc.d/ only
and because of this I thought a line in polipo's conf : 'daemonise = true' would be invalid unless a polipo daemon existed in /etc/rc.d/ .. same thought for tor's torrc line : 'RunAsDeamon 1'
Am I being wrong?
Reply With Quote
  #7   (View Single Post)  
Old 23rd January 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

news/sabnzbd was added to the ports tree only 7 months ago, without an rc.d script. There was no discussion of the daemon on the ports@ mailing list. You might want to contact the $MAINTAINER as I recommended above. Port maintainers publish their Email addresses in the ports tree and are expected to receive and respond to queries from users. If you don't have the ports tree installed on your system, a web interface to the ports tree is managed by a third party (http://openports.se) and you can find the $MAINTAINER's name and Email address on this page: http://openports.se/bbmaint.php?maint=marcus|a|nazgul.ch
Quote:
Am I being wrong?
You misunderstand. /etc/rc.d is only used for daemon control scripts that follow the requirements of the rc.d infrastructure. Please, read the rc.d(8) and rc.subr(8) man pages.

Last edited by jggimi; 23rd January 2013 at 07:07 PM. Reason: typo, clarity
Reply With Quote
  #8   (View Single Post)  
Old 23rd January 2013
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

Thanks jggimi , for your help and helpfulness.
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
How to make polipo proxy transparent? Skinny OpenBSD Packages and Ports 6 5th December 2012 03:25 AM
D Bus error while starting gnome jewsofeast OpenBSD Packages and Ports 2 21st November 2010 05:37 AM
vsftpd not starting map7 FreeBSD Ports and Packages 1 10th June 2010 09:51 AM
Samba NOT STARTING pcfxer FreeBSD General 11 13th May 2008 09:29 AM


All times are GMT. The time now is 03:05 AM.


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