cjdelisle / cjdns.sh

Shell script for installing, updating, and launching cjdns
2 stars 0 forks source link

System D Reliance #1

Open krionical opened 1 day ago

krionical commented 1 day ago

I was testing this out for on boarding potential issues. I ran the script, and got this in return:

Downloading / updating cjdns File cjdroute has different hash (likely update) - re-downloading Updating cjdns conf file: /etc/cjdroute_3478.conf Installing systemd launcher /etc/systemd/system/cjdns-sh.service Created symlink /etc/systemd/system/multi-user.target.wants/cjdns-sh.service → /etc/systemd/system/cjdns-sh.service. System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Cjdns should be running with admin port 3479 You can control it using 'cjdnstool -p 3479' For example, to get the list of your peers, use cjdnstool -p 3479 peers show' As follows: cjdnstool: Could not find cjdns (127.0.0.1:3479), see: https://github.com/cjdelisle/cjdnsadmin#connecting Your cjdns public UDP port is 3478, and Peer ID is PUB_NotYielding This port MUST be open to the outside world in order to yield, check your firewall / NAT This script will update every restart. You can use systemctl restart cjdns-sh.service to restart it. To stop cjdns from restarting, you can use: systemctl disable cjdns-sh.service You may run this script any time, and in case of cjdns installation issues, your installation will be fixed.

The script isn't wrong. I don't use systemd on this system. It uses Sysvinit. Not sure if this is something to test for in the script as most people will probably be using systemd, but wanted to let the issue be known. (The script doesn't work as the output suggests despite seeming like it does at the end)

cjdelisle commented 16 hours ago

I see, so you HAVE systemd on the machine, but it is deactivated, that's why the detection /etc/systemd/system passed, but then it failed to launch with systemctl.

Do you know if there's a convenient way to check if systemd is deactivated? I will add to the script to check on that.

Currently it supports systemd and open-rc (I use Alpine a lot). If you can help configure it, I can make it work also with bare sysvinit.

krionical commented 6 hours ago

Yeah, this distro has "hooks" for systemd for compatibility, but it doesn't actually have systemd itself.

A quick glance shows this might be a solution to check for systemd: https://unix.stackexchange.com/questions/121654/convenient-way-to-check-if-system-is-using-systemd-or-sysvinit-in-bash

Right now, I install cjdns via brew for linux since the python version it wanted was older (2.7) and I didn't feel like snake handling as my repo has tossed support for that out.

I'll play a little with the config and see what I come up with when I get some time. Thanks for the response!

edit: Better reference: https://itsfoss.com/check-if-systemd/