Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › antiX 22 runit and rc.local
- This topic has 3 replies, 3 voices, and was last updated Oct 25-7:07 pm by fungalnet.
-
AuthorPosts
-
October 21, 2022 at 1:03 pm #91158Member
ATGhQlsvhij19tw5jgDi
Hi all,
I am an extremely happy antiX user.
Till yesterday I used sysV init, today I have installed antiX 22 runit.Under sysV I used to start my wireguard vpn service adding the below code >> /etc/rc.local
wg-quick up wireguard_instacethe wireguard instance used to successfully load at boot.
I have done the same with my new antiX 22 runit.
I am facing the following issue:
– the service load at boot, in fact if I give
sudo wg-quick up wireguard_instancethe system responds that it is already up.
But my antiX is not connected to the wiguard VPN. It looks like the command was processed at boot but failed to connect to the vpn.
If I restart the service manually
sudo wg-quick down wireguard_instance ; sudo wg-quick up wireguard_instancemy wireguard vpn connection works without any issue.
It looks like something goes wrong during the boot process.
My questions are two:
– where can I get a log to investigate the issue?
– am I doing it correctly? below my rc.local#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # wg-quick up wireguard_instance exit 0Thank you very much for your help and patience.
A.
- This topic was modified 6 months, 2 weeks ago by ATGhQlsvhij19tw5jgDi.
October 21, 2022 at 2:50 pm #91161Forum Admin
anticapitalista
::You probably need a runit service file for wireguard.
What if you write a script with
sudo wg-quick down wireguard_instance ; sudo wg-quick up wireguard_instanceand add the script name to ~/.desktop-session/startup file?
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
October 21, 2022 at 3:11 pm #91167MemberATGhQlsvhij19tw5jgDi
::at the end of ~/.desktop-session/startup
/home/username/.script.sh &the content of .script.sh
#!/bin/bash # sudo wg-quick down wireguard_instance ; sudo wg-quick up wireguard_instanceit is not processed at boot.
After the boot if I give
sudo wg-quick down wireguard_instanceit tells me it is NOT up;
whereas my first option (see my first message) at least it was called, but failed somewhere
- This reply was modified 6 months, 2 weeks ago by ATGhQlsvhij19tw5jgDi.
- This reply was modified 6 months, 2 weeks ago by ATGhQlsvhij19tw5jgDi.
October 25, 2022 at 7:07 pm #91510Member
fungalnet
::It sounds like a stage1 stage2 problem, and this vpn service may be failing before network is functional.
Another consideration is that a service manager/supervison is used to make sure the process/daemon/service is running, not that the outcome of it is functional. For example you write a script that says:
sleep 3 && cat /etc/ffstab >>/tmp/out within a loop of some sort, and you ask runit to run this script, runit doesn’t see anything wrong with running it, the outcome though is false because of a misspelling of a file. Or ntpd can be running without a functional connection to the net, it is not failing to execute, it is failing to synchronize your clock. If you send a command to kill ntpd runit will restart it, still not giving you a response from time servers. Another example would be to have something like dhcpcd running, pulling the cable out of the net-card doesn’t kill the service, nor is a service supervisor recognizing there is a problem, as dhcpcd keeps running.anti-X - Adélie - obarun - systemd Free Space
-
AuthorPosts
- You must be logged in to reply to this topic.