Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 18138  / 3 Years ago, sun, may 16, 2021, 8:57:11

I have just installed No-IP on a brand new Ubuntu 12.04 install. The program starts fine when I start it from the CLI, but if I try to make this startup script work it won't start.



I got this script from their install instructions:



#! /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."
killall -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0


The CL is correct because if I run /usr/local/bin/noip2 it starts. But the script itself won't start it.



What do I have wrong in there? The script is executable:



-rwxrwxrwx   1 root root   299 Jan 12 13:28 noip*


EDIT



If I try the Init.d script it also works:



sudo /etc/init.d/noip start


It starts up just fine that way without a hitch.


More From » bash

 Answers
2

You should run this (if you have not done so):



sudo update-rc.d noip2 defaults

[#33071] Sunday, May 16, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
housecoarmer

Total Points: 434
Total Questions: 116
Total Answers: 120

Location: Albania
Member since Sun, Nov 22, 2020
4 Years ago
;