You are not logged in.

#1 2023-09-09 18:22:18

genji
Member
Registered: 2023-08-13
Posts: 61

[SOLVED] How do I get znc to auto-start at boot?

Hi there, I did 'systemctl enable znc' and it appeared to have run and done some kind of entry successfully, and then followed it up with 'systemctl start znc'.  But both commands appear to not have worked correctly.

znc does not start at boot-time as I thought enabling would do, and znc does not start when launched via 'systemctl start znc' but instead has to be run by typing 'znc' at the bash prompt instead

What did I do wrong?

Thanks !

Last edited by genji (2023-09-09 19:59:37)

Offline

#2 2023-09-09 18:59:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,099

Re: [SOLVED] How do I get znc to auto-start at boot?

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
systemctl list-unit-files
systemctl status znc

Offline

#3 2023-09-09 19:40:40

genji
Member
Registered: 2023-08-13
Posts: 61

Re: [SOLVED] How do I get znc to auto-start at boot?

seth wrote:

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
systemctl list-unit-files
systemctl status znc

Hi seth!

# find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.resolve1.service    | system
getty@tty1.service                       | getty.target.wants
iptables.service                         | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
NetworkManager.service                   | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
sshd.service                             | multi-user.target.wants
systemd-resolved.service                 | sysinit.target.wants
wg-quick@wg0.service                     | multi-user.target.wants
znc.service                              | multi-user.target.wants
# systemctl list-unit-files

https://pastebin.com/qSngBjrZ

# systemctl status znc
× znc.service - ZNC, an advanced IRC bouncer
     Loaded: loaded (/usr/lib/systemd/system/znc.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2023-09-09 14:12:45 EDT; 1h 26min ago
   Duration: 2.550s
   Main PID: 4188 (code=exited, status=1/FAILURE)
        CPU: 831ms

Sep 09 14:12:43 gateway-proton systemd[1]: Started ZNC, an advanced IRC bouncer.
Sep 09 14:12:45 gateway-proton znc[4188]: Checking for list of available modules...
Sep 09 14:12:45 gateway-proton znc[4188]: Opening config [/var/lib/znc/.znc/configs/znc.conf]... [ No such file ]
Sep 09 14:12:45 gateway-proton znc[4188]: Restart ZNC with the --makeconf option if you wish to create this config.
Sep 09 14:12:45 gateway-proton znc[4188]: Unrecoverable config error.
Sep 09 14:12:45 gateway-proton systemd[1]: znc.service: Main process exited, code=exited, status=1/FAILURE
Sep 09 14:12:45 gateway-proton systemd[1]: znc.service: Failed with result 'exit-code'.

I guess that explains it, it's trying to start but saying there's no config file created..  Guess I need to figure that out now, hopefully just by coping my znc.conf to /var/lib/znc/.znc/configs/ by the looks of that?

Thanks seth

Offline

#4 2023-09-09 19:43:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,099

Re: [SOLVED] How do I get znc to auto-start at boot?

Looks like, https://wiki.archlinux.org/title/ZNC even point this out.

sudo -u znc znc --makeconf

Offline

Board footer

Powered by FluxBB