You are not logged in.
HI there, i am trying the "noip2" startup automatically with system boot. but i dont know why the follow process don't work with Devuan Jessie 1.0 :
sudo touch /etc/init.d/noip2
sudo chmod a+o+x /etc/init.d/noip2
echo '#! /bin/sh
# /etc/init.d/noip2.sh
# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Florian Moesch
. /lib/lsb/init-functions # modify for your init-functions
PROG=/usr/local/bin/noip2
NAME=noip2
test -x $PROG || exit 0
case "$1" in
start)
echo -n "Starting dynamic address update: "
$PROG
echo "$NAME."
;;
stop)
echo -n "Shutting down dynamic address update:"
killall $NAME
echo "$NAME."
;;
restart)
echo -n "Restarting dynamic address update: "
killall $NAME
$PROG
echo "$NAME."
;;
status)
status_of_proc $PROG $NAME && exit 0 || exit $?
;;
*)
echo "Usage: $0 {status|start|stop|restart}"
exit 1
esac
exit 0
' | sudo tee /etc/init.d/noip2
sudo chmod a+x /etc/init.d/noip2 ; \
sudo rc-update add noip2 default ; \
sudo rc-service noip2 start
if i restart, and use :
ps -A | noip
Is not running for start i must use :
sudo rc-service noip2 start
What is wrong with the script?
Last edited by inukaze (2018-08-14 23:35:53)
Offline
What init system are you using? The rc-update and rc-service commands at the end suggest that the instructions are for openrc, which is not Devuan's default.
Last edited by GNUser (2018-08-15 18:21:29)
Offline
[SOLUTION]
echo '#!/sbin/runscript
description="Start/Stop the no-ip daemon"
depend()
{
after *
keyword notimeout
}
start()
{
ebegin "Starting NoIP"
/usr/bin/noip2
eend $? "Failed to start NoIP"
}
stop()
{
ebegin "Stopping NoIP"
killall -TERM /usr/bin/noip2
eend $? $"Failed to stop NoIP"
}' | sudo tee /etc/init.d/noip2 ; sudo chmod a+rx /etc/init.d/noip2
Source -> https://forums.gentoo.org/viewtopic-t-7 … art-0.html
Last edited by inukaze (2018-08-15 00:09:33)
Offline