PiHole update to 5.15 /etc/.pihole/automated install/basic-install.sh: line 1390: update-rc.d: command not found

This is running on Fedora 36

Log of install:

 pihole -up
  [✓] Checking for git
  [✓] Checking for dialog
  [✓] Checking for iproute
  [✓] Checking for newt
  [✓] Checking for procps-ng
  [✓] Checking for chkconfig
  [✓] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     update available
  [i] Web Interface:    update available
  [i] FTL:              update available

  [i] Pi-hole core files out of date, updating local repo.
  [✓] Check for existing repository in /etc/.pihole
  [i] Update repo in /etc/.pihole...HEAD is now at 9048429b v5.15 (#5082)
  [✓] Update repo in /etc/.pihole

  [i] If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'

  [i] Pi-hole Web Admin files out of date, updating local repo.
  [✓] Check for existing repository in /var/www/html/admin
  [i] Update repo in /var/www/html/admin...HEAD is now at 30668d4d v5.18.1 (#2493)
  [✓] Update repo in /var/www/html/admin

  [i] If you had made any changes in '/var/www/html/admin/', they have been stashed using 'git stash'

  [i] FTL out of date, it will be updated by the installer.

  [✓] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [✓] Default SELinux: permissive
  [✓] Current SELinux: permissive

  [✓] Checking dnf for upgraded packages... 4 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for bind-utils

  [✓] Supported OS detected
  [i] Checking for / installing Required dependencies for this install script...
  [✓] Checking for git
  [✓] Checking for dialog
  [✓] Checking for iproute
  [✓] Checking for newt
  [✓] Checking for procps-ng
  [✓] Checking for chkconfig
  [✓] Checking for ca-certificates

  [i] Performing unattended setup, no dialogs will be displayed
  [i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
  [✓] Resetting repository within /var/www/html/admin...
  [i] Checking for / installing Required dependencies for Pi-hole software...
  [✓] Checking for cronie
  [✓] Checking for curl
  [✓] Checking for findutils
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for libidn2
  [✓] Checking for psmisc
  [✓] Checking for libcap
  [✓] Checking for nmap-ncat
  [✓] Checking for jq
  [✓] Checking for lighttpd
  [✓] Checking for lighttpd-fastcgi
  [✓] Checking for php-common
  [✓] Checking for php-cli
  [✓] Checking for php-pdo
  [✓] Checking for php-xml
  [i] Checking for php-json (will be installed)
  [✓] Checking for php-intl
  [i] Processing dnf install(s) for: php-json, please wait...
----------------------------------------------------------------------
Last metadata expiration check: 4:15:14 ago on Sun 22 Jan 2023 06:53:23 GMT.
Package php-common-8.1.14-1.fc36.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
----------------------------------------------------------------------
  [✓] Enabling lighttpd service to start on reboot...
  [✓] Checking for user 'pihole'

  [i] FTL Checks...

  [✓] Detected x86_64 processor
  [i] Checking for existing FTL binary...
  [✓] Downloading and Installing FTL
  [✓] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
/etc/.pihole/automated install/basic-install.sh: line 1390: update-rc.d: command not found

  [✓] Installing sudoer file

  [✓] Installing latest Cron script

  [i] Installing latest logrotate script...
        [i] Existing logrotate file found. No changes made.
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
  [✓] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved does not need to be restarted
  [i] Restarting lighttpd service...
  Unable to complete update, please contact Pi-hole Support

Debug Token:

https://tricorder.pi-hole.net/0XumOmh2/

Do you have systemd or SysVinit or another init system?

command -v systemctl
ls -l /sbin/init

update-rd.d along with invoke-rc.d are helpers to manage SysVinit/init.d services, but usually present on distros with systemd as well.

Looks like I have systemd:

[root@acerveriton dave]# command -v systemctl
/usr/bin/systemctl
[root@acerveriton dave]# ls -l /sbin/init
lrwxrwxrwx. 1 root root 22 Dec 20 18:56 /sbin/init -> ../lib/systemd/systemd
[root@acerveriton dave]#

both update-rd.d and invoke-rc.d give 'command not found'

I've managed to make pihole work by manually starting FTL - systemctl start pihole-FTL but the update still fails

On Debian and Ubuntu this command is shipped with the essential init-system-helpers package, but from what I found is that Fedora (RPM distros in general) traditionally use a different equivalent command.

Either way, if systemd is installed, systemctl should be used. Either a bug in the installer or your system is not identified correctly as RPM distro.

The installer stops because lighttpd did not start properly.

Please run lighttpd -tt -f /etc/lighttpd/lighttpd.conf and post the output.

I've fixed lighttpd so it works for me - when I ran the command I received no output.

note I have 2 external.conf files the second one needs to run after fastcgi server is specified, as i use lighttpd to run several local websites.

here is the output from cat /etc/lighttpd/lighttpd.conf:

# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Lighttpd config for Pi-hole
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.

###############################################################################
#     FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE.     #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
#                                                                             #
#              CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE:              #
#                         /etc/lighttpd/external.conf                         #
###############################################################################

server.modules = (
    "mod_access",
    "mod_auth",
    "mod_expire",
    "mod_fastcgi",
    "mod_accesslog",
    "mod_redirect",
    "mod_setenv",
    "mod_rewrite"
)

server.document-root        = "/var/www/html"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error-pihole.log"
server.pid-file             = "/run/lighttpd.pid"
server.username             = "lighttpd"
server.groupname            = "lighttpd"
# For lighttpd version 1.4.46 or above, the port can be overwritten in `/etc/lighttpd/external.conf` using the := operator
# e.g. server.port := 8000
server.port                 = 80

# Allow streaming response
# reference: https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-response-bodyDetails
server.stream-response-body = 1
#ssl.read-ahead              = "disable"

index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

mimetype.assign = (
    ".ico"   => "image/x-icon",
    ".jpeg"  => "image/jpeg",
    ".jpg"   => "image/jpeg",
    ".png"   => "image/png",
    ".svg"   => "image/svg+xml",
    ".css"   => "text/css; charset=utf-8",
    ".html"  => "text/html; charset=utf-8",
    ".js"    => "text/javascript; charset=utf-8",
    ".json"  => "application/json; charset=utf-8",
    ".map"   => "application/json; charset=utf-8",
    ".txt"   => "text/plain; charset=utf-8",
    ".eot"   => "application/vnd.ms-fontobject",
    ".otf"   => "font/otf",
    ".ttc"   => "font/collection",
    ".ttf"   => "font/ttf",
    ".woff"  => "font/woff",
    ".woff2" => "font/woff2"
)

# Add user chosen options held in (optional) external file
include "external.conf"

# default listening port for IPv6 falls back to the IPv4 port
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
#include_shell "/usr/share/lighttpd/create-mime.assign.pl"
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

fastcgi.server = (
    ".php" => (
        "localhost" => (
            "socket" => "/tmp/php-fastcgi.socket",
            "bin-path" => "/usr/bin/php-cgi"
        )
    )
)

include "external2.conf"

include "/etc/lighttpd/conf.d/pihole-admin.conf"

If this is working for you, remove:

###############################################################################
#     FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE.     #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
#                                                                             #
#              CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE:              #
#                         /etc/lighttpd/external.conf                         #
###############################################################################

From the top of the file otherwise it will be overwritten on the next update

The only time we would touch lighttpd.conf after that is to check that it has the pihole-admin.conf include:

I've done that; Many thanks for your help.

Just ran the update to 15.15.3 ... no problems ... Fix worked ... Many Thanks again

1 Like