DNS2GO service script?

From: JonnieStyle (jonniestyle_at_hotmail.com)
Date: 03/26/05


Date: 26 Mar 2005 09:42:13 -0800

Hi folks,

I realize this has been talked about, but I still can't find out the
answer to my grief.
This script (which is commonplace for redhat and mandrake users) is
hanging immediately following
"Connecting to DNS2GO..."

...here's the script...

#!/bin/sh
#START OF SCRIPT
#Cut & paste in /etc/rc.d/init.d/dns2go

# dns2go This script starts or stops an DNS2GO connection

# description: Connects to Dynamic Name Server

# Source function library if it exists
test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions

prefix=/usr/local/bin
exec_prefix=${prefix}

# Paths to programs
START=${exec_prefix}/dns2go
STOP=${exec_prefix}/dns2go
STATUS="/bin/cat /var/dns2go/status.dat"
case "$1" in
start)
echo -n "Connecting to DNS2GO"

$START
if [ $? = 0 ] ; then
touch /var/lock/subsys/dns2go
echo_success
else
echo_failure
fi
echo ""
;;

stop)
echo -n "Shutting down DNS2GO link"

$STOP -k > /dev/null 2>&1
if [ $? = 0 ] ; then
rm -f /var/lock/subsys/dns2go
echo_success
else
echo_failure
fi
echo ""
;;

restart)
$0 stop
$0 start
;;

status)
$STATUS
;;

*)
echo "Usage: dns2go {start|stop|restart|status}"
exit 1
esac

exit 0

Now, if I run dns2go manually it fires up fine, but if I have it
running as a service, it hangs. Anybody run into this before?

Cheers.



Relevant Pages

  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)
  • Ripping Tapes with Linux--How To
    ... the full script is located in the BASH ... My tape player is a portable style journalist's recorder from the ... The most irritating part of the recording process was setting the ... echo Starting de-noise procedure to file $TMP1 ...
    (comp.os.linux.misc)
  • Re: Linux Backup with Modification Date Filter?
    ... I wrote a bash script that acts as a wrapper to rsnapshot which first ... generates a modification-date filter, ...
    (comp.os.linux.misc)
  • Re: Command Script variable value lost during execution
    ... The value of RC_ver is numeric but ECHO would return it numeric or not... ... I checked ERRORLEVEL at the end of the script and it was 0 but again ... ECHO RoboCopy version xxx%RC_Ver%yyy ... CALL:GetRCVer RoboCopy.exe /Path ...
    (microsoft.public.windows.server.scripting)
  • Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
    ... If you are running the dhclient then all you have to do is ... create the hooks script with YOUR CODE. ... DNS server with my wgets and then restart my firewall. ... You can put an echo statement on commands to show you what will happen ...
    (alt.os.linux)