okTurtles / dnschain

A blockchain-based DNS + HTTP server that fixes HTTPS security, and more!
https://okturtles.com
Other
1.73k stars 169 forks source link

Startup launch in FreeBSD #152

Closed tofutim closed 9 years ago

tofutim commented 9 years ago

When I install PowerDNS Recursor in FreeBSD using pkg install powerdns-recursor, I see the following:

 *******************************************************************
 If you want to use the powerdns recursor,
 you need the following line in /etc/rc.conf(.local)

    pdns_recursor_enable="YES"

 Configuration templates are available in /usr/local/etc/pdns
 as recursor.conf-dist.
*******************************************************************

So I make the change in rc.conf and recursor.conf and shutdown -r now and magically recursor is alive and well. How can I make this happen with namecoind and dnschain? Incidentally, when manually started with namecoind & and dnschain &, the whole system does work on FreeBSD. Any tips from FreeBSD gurus much appreciated.

I guess what I'm asking is do you haz teh codez?

tofutim commented 9 years ago

Still working on figuring this out. Here are my rc.d files

namecoind:

#!/bin/sh
#
# $$
#

# PROVIDE: namecoind
# REQUIRE: SERVERS cleanvar
# BEFORE:  DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable pdns_recursor:
#
# namecoind_enable="YES"
#

. /etc/rc.subr

name=namecoind
rcvar=namecoind_enable

command=/usr/local/bin/namecoind

# set defaults

namecoind_enable=${namecoind_enable:-"YES"}

load_rc_config ${name}
run_rc_command "$1"

dnschain:

#!/bin/sh
#
# $$
#

# PROVIDE: dnschain
# REQUIRE: SERVERS cleanvar
# BEFORE:  DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable dnschain:
#
# dnschain_enable="YES"
#

. /etc/rc.subr

name=dnschain
rcvar=dnschain_enable

command=/usr/local/bin/dnschain

# set defaults

dnschain_enable=${dnschain_enable:-"YES"}

load_rc_config ${name}
run_rc_command "$1"

And the results:

root@papaya:~ # service namecoind start
Starting namecoind.
Warning: To use namecoind, you must set rpcpassword=<password>
in the configuration file: /.namecoin/namecoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
root@papaya:~ # service dnschain start
Starting dnschain.
env: coffee: No such file or directory
/usr/local/etc/rc.d/dnschain: WARNING: failed to start dnschain
root@papaya:~ # 
taoeffect commented 9 years ago

Well, I am not a FreeBSD expert, and this question seems more appropriate for the forums, but as far as that last warning goes, it suggests you either haven't installed coffee-script, or you did but it's not in your $PATH.

tofutim commented 9 years ago

This is resolved in the instructions