Hi,
First of all I am a newbee in Linux, I am just discovering it…
I just installed the no-ip client v2.1.9 on my MBWE blue rings and it works.
Now I would like it to run at startup (I sometimes turn my NAS off) so I checked at the readme file in the no-ip package but there is no way I can manage to do what is required by myself. Need help!
Here are the instructions that can be found in the redme file:
//HOW TO START THE CLIENT
The noip2 executable can be run by typing /usr/local/bin/noip2
If you want it to run automatically when the machine is booted, then
place the following script in your startup directory. (/etc/init.d/rcX.d
or /sbin/init.d/rcX.d or ???)//
#! /bin/sh
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
case "$1" in
start)
echo "Starting noip2."
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2."
killproc -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
//Where the 'X' in rcX.d is the value obtained by running the
following command
grep initdefault /etc/inittab | awk -F: '{print $2}'
Killproc can be downloaded from *link deleted*
Alternatively, you can uncomment the line after #! /bin/sh
If you have a recent RedHat version, you may want to use the startup script
supplied by another user. It's in this package called redhat.noip.sh
It may need some modification for your system.
There is a startup script for Debian called debian.noip2.sh.
It also has been supplied by another user and is rumored to fail in some
situations.
Another user has supplied a proceedure to follow for MAc OS X auto startup.
It's called mac.osx.startup. Mac users may wish to read that file.
Here is a script which will kill all running copies of noip2.
#!/bin/sh
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done
These four lines can replace 'killproc' and 'stop_daemon' in the other scripts.
If you are behind a firewall, you will need to allow port 8245 (TCP) through
in both directions.
#######################################################################
IMPORTANT!! Please set the permissions correctly on your executable.
If you start noip2 using one of the above methods, do the following:
chmod 700 /usr/local/bin/noip2
chown root:root /usr/local/bin/noip2
If you start noip2 manually from a non-root account, do the chmod 700 as
above but chown the executable to the owner:group of the non-root account, and
you will need to substitute your new path if the executable is not in
/usr/local/bin.//
- First: the command line grep initdefault /etc/inittab | awk -F: '{print $2}' doesn't display anything.
- Do I have to create the file rcX.d?
- What system is running on the blue rings? (RedHat? Debian? Other?)
- Do I need Killproc?
- Is there anyway to do it more simple? (I'm not sure I have nano installed and I don't know vi at all)
Sorry for all of this ignorance but I already spent A LOT of time to reach this point and it's too bad to be stuck there…
Thanks in advance for your help