prdtn
March 27, 2018, 5:33pm
1
Expected Behaviour:
active (running)
Actual Behaviour:
Although I dont have any problems its kinda weird and I wonder if I have to worry about the exited FTL service.
pihole status
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
systemctl status pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Tue 2018-03-27 13:19:34 CEST; 6h ago
Docs: man:systemd-sysv-generator(8)
Process: 4876 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
Process: 4923 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/pihole-FTL.service
Debug Token:
igwvjdtyq0
//edit: The only issue I'm having is that pihole -up always tells me there is an update for FTL but after updating the update is available again and again and ...
pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] FTL: update available
[i] FTL out of date
[i] FTL Checks...
[✓] Detected x86_64 architecture
[i] Checking for existing FTL binary...
[✓] Downloading and Installing FTL
[i] Web Interface: up to date
[i] FTL version is now at
[✓] Starting pihole-FTL service
[✓] Enabling pihole-FTL service to start on reboot
Thanks
DL6ER
March 27, 2018, 6:24pm
3
I agree, due to historical reasons, we are using an init.d
script. We could look into changing it to systemd
, but this may lead to additional problems. @DanSchaper would our lowest supported OS be fine with us switching to a systemd
unit file?
1 Like
prdtn
March 27, 2018, 6:46pm
4
at least for me init.d is also fine but im getting:
/etc/init.d/pihole-FTL status
/etc/init.d/pihole-FTL: line 78: status: command not found
Directly supported, they pretty much are all on Systemd. But there are a number of heavily used, but user supported installations that run in chroot jails and those tend to be sysvinit still. So we could try to detect the running init system and install the correct scripts, but I can see that getting pretty messy to handle.
1 Like
sysvinit still works fine. I'm a fan of systemd but I agree there is a large section of the community that may make things more difficult for.
DL6ER
April 14, 2018, 9:32am
8
This problem should be resolved by
pi-hole:development
← pi-hole:FTLDNS-systemd
opened 09:31AM - 14 Apr 18 UTC
**By submitting this pull request, I confirm the following:**
*please fill any… appropriate checkboxes, e.g: [X]*
- [x] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [x] I have made only one major change in my proposed changes.
- [x] I have commented my proposed changes within the code.
- [x] I have tested my proposed changes, and have included unit tests where possible.
- [x] I am willing to help maintain this change if there are issues with it later.
- [x] I give this submission freely and claim no ownership.
- [x] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [x] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
Please make sure you [Sign Off](https://github.com/pi-hole/pi-hole/wiki/How-to-signoff-your-commits.) all commits. Pi-hole enforces the [DCO](https://github.com/pi-hole/pi-hole/wiki/Contributing-to-the-project).
---
**What does this PR aim to accomplish?:**
Replace the ancient `init.d` script for starting and controlling the `pihole-FTL` process by a modern `systemd` unit. This should resolve some problems as discussed [here](https://discourse.pi-hole.net/t/service-pihole-ftl-active-exited/8335) or [here](https://discourse.pi-hole.net/t/pihole-ftl-is-working-but-webmin-says-the-service-is-not-running/8368).
This now also makes the `status` command behave correctly, as `systemd` can use the PID file of FTL to find out if it is actually running or not:
![screenshot at 2018-04-14 11-24-00](https://user-images.githubusercontent.com/16748619/38766751-db805ed6-3fd6-11e8-99ad-ca925f00d11e.png)
Also, since *FTL*DNS is a very important part of your system, the unit ensures that it will be automatically restarted whenever something unexpected happens. As an example, I sent `SIGKILL` to FTL and as you can see, `systemd` took care about immediately restarting the service:
![screenshot at 2018-04-14 11-27-08](https://user-images.githubusercontent.com/16748619/38766768-1276bd40-3fd7-11e8-97ea-3411a6f0479b.png)
Note that we do not restart `pihole-FTL` automatically after having received `SIGTERM` as this is the correct way of terminating the resolver (e.g. through `service pihole-FTL stop`).
**How does this PR accomplish the above?:**
I wrote a systemd unit for `pihole-FTL` and modified the installer to replace the old init.d script.
**What documentation changes (if any) are needed to support this PR?:**
All commands should work as before.
2 Likes
system
Closed
May 5, 2018, 9:32am
9
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.