You are not logged in.

#1 2012-07-31 11:43:25

sistematico
Member
From: Campo Grande / MS / Brasil
Registered: 2008-07-26
Posts: 97
Website

[SOLVED] Systemd + No-IP

How to set noip.service with Systemd?
Sorry for noob question.

I read some wikis, but I'm still a little confused:
https://wiki.archlinux.org/index.php/Systemd
https://wiki.archlinux.org/index.php/Systemd/Services

Thanks in advance.

Last edited by sistematico (2012-08-17 16:50:43)


Lucas Saliés Brum
blog | medium | vk | twitter | github | .share
Forgive the spelling and grammar, English is not my native language.

Offline

#2 2012-07-31 12:37:31

swordfish
Member
Registered: 2012-01-14
Posts: 160

Re: [SOLVED] Systemd + No-IP

1. What says

systemctl status noip.service

2. If it's an existing service, all you have to do to start it is

# systemctl start noip.service

3. To enable it at startup

# systemctl enable noip.service

Otherwise you may have to create a custom unit file


Arch_x64 on Thinkpad Edge E520 (Intel Core i5, 4 GB RAM, 128 GB Crucial M4 SSD) + ITX-Desktop (Asrock H77M-ITX, Intel Core i3-2120T, 8GB RAM, 64 GB Samsung 830 SSD)

Offline

#3 2012-08-01 05:09:31

sistematico
Member
From: Campo Grande / MS / Brasil
Registered: 2008-07-26
Posts: 97
Website

Re: [SOLVED] Systemd + No-IP

I try this:

[Unit]
Description=No-IP Dynamic DNS Update Client
After=network.target

[Service]
Type=forking
#Type=simple
#Type=oneshoot
PIDFile=/run/noip2.pid
ExecStart=/usr/bin/noip2 -D /run/noip2.pid
RemainAfterExit=no

[Install]
WantedBy=multi-user.target

But not working:

[root@ironhide ~]:$ systemctl start noip.service
Job failed. See system journal and 'systemctl status' for details.
[root@ironhide ~]:$ systemctl status noip.service
noip.service - No-IP Dynamic DNS Update Client
	  Loaded: loaded (/etc/systemd/system/noip.service; enabled)
	  Active: failed (Result: timeout) since Wed, 01 Aug 2012 01:12:33 -0400; 3min 25s ago
	 Process: 27627 ExecStart=/usr/bin/noip2 -D /run/noip2.pid (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/noip.service

Aug 01 01:11:03 ironhide noip2[27628]: v2.1.9 daemon started with NAT enabled
Aug 01 01:11:05 ironhide noip2[27628]: ironhide.zapto.org set to 187.119.172.166
Aug 01 01:12:33 ironhide noip2[27628]: v2.1.9 daemon ended.

The IP "apparently" is updated, but this error is shown.
Any help is welcome.

Last edited by sistematico (2012-08-01 05:18:11)


Lucas Saliés Brum
blog | medium | vk | twitter | github | .share
Forgive the spelling and grammar, English is not my native language.

Offline

#4 2012-08-01 07:44:26

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] Systemd + No-IP

An other way to go is to use inadyn with config for noip. The fedora package inadyn-mt contains a systemd service file; http://pkgs.org/fedora-17/fedora-update … 4.rpm.html

It's in the aur and can be something to try. Another approach is to create a script with the right options and then call that from a service file. Read up on the systemd options Oneshot and Remainafterexit. I'm using inadyn for three different accounts/domains including noip, and it is easy to configure and works very well. Haven't tried it with systemd, though.

Offline

#5 2012-08-01 08:12:42

sistematico
Member
From: Campo Grande / MS / Brasil
Registered: 2008-07-26
Posts: 97
Website

Re: [SOLVED] Systemd + No-IP

Im not sure, but this maybe work:

[Unit]
Description=No-IP Dynamic DNS Update Client
After=network.target

[Service]
Type=forking
ExecStart=/usr/bin/noip2

[Install]
WantedBy=multi-user.target

Lucas Saliés Brum
blog | medium | vk | twitter | github | .share
Forgive the spelling and grammar, English is not my native language.

Offline

#6 2012-11-16 16:38:17

ScriptJunkie
Member
Registered: 2012-11-16
Posts: 2

Re: [SOLVED] Systemd + No-IP

You can use:

$ sudo systemctl enable noip2.service

And you'll get something like this:

$ sudo systemctl enable noip2.service
ln -s '/usr/lib/systemd/system/noip2.service' '/etc/systemd/system/multi-user.target.wants/noip2.service'

The package from Community includes the systemd link now.

Last edited by ScriptJunkie (2012-11-16 16:40:10)

Offline

Board footer

Powered by FluxBB