Start BIRD automatically
Hi, how can BIRD automatically start after a reboot or a crash? Should I use systemd? I am using BIRD v2 on Ubuntu 20.04. Fabiano
Hello, Personally I would use a basic bash script in background that checks with ps if the process is still active and if not it will transfer logs in in "crash" folder and restart the daemon. Probably before restarting the program I will do a check if there are still zombies or inactive process in background and eventually I close them. I would suggest this last check also when you manually start it. I don't know if there are better solutions but this would do the work. Mattia On 02/06/20 16:28, Fabiano D'Agostino wrote:
Hi, how can BIRD automatically start after a reboot or a crash? Should I use systemd? I am using BIRD v2 on Ubuntu 20.04.
Fabiano
"Fabiano D'Agostino" <fabiano.dagostino96@gmail.com> writes:
Hi, how can BIRD automatically start after a reboot or a crash? Should I use systemd? I am using BIRD v2 on Ubuntu 20.04.
I'm using this: [Unit] Description=BIRD routing daemon After=network.target [Service] Type=forking Restart=always ExecStart=/usr/bin/bird ExecReload=/usr/bin/birdc configure ExecStop=/usr/bin/birdc down [Install] WantedBy=multi-user.target
Hi, thank you! It seems working. But do I have to execute sudo systemctl enable bird.service? Because I just did sudo systemctl start bird.service and it seems restarting after reboot Il giorno mar 2 giu 2020 alle ore 17:03 Toke Høiland-Jørgensen <toke@toke.dk> ha scritto:
"Fabiano D'Agostino" <fabiano.dagostino96@gmail.com> writes:
Hi, how can BIRD automatically start after a reboot or a crash? Should I use systemd? I am using BIRD v2 on Ubuntu 20.04.
I'm using this:
[Unit] Description=BIRD routing daemon After=network.target
[Service] Type=forking Restart=always ExecStart=/usr/bin/bird ExecReload=/usr/bin/birdc configure ExecStop=/usr/bin/birdc down
[Install] WantedBy=multi-user.target
"Fabiano D'Agostino" <fabiano.dagostino96@gmail.com> writes:
Hi, thank you! It seems working. But do I have to execute sudo systemctl enable bird.service?
If it's not already, that would be the way to start it at boot...
Because I just did sudo systemctl start bird.service and it seems restarting after reboot
Maybe it was already enabled? -Toke
It seems that if bird.service is located in /etc/systemd/system sudo systemctl start bird.service is enough and when I reboot the system bird is running, indeed if I try sudo systemctl enable bird.service I get 'no such file or directory'. Instead if I place bird.service in /lib/systemd/system I have to do sudo systemctl enable bird.service. Fabiano
participants (3)
-
Fabiano D'Agostino -
Mattia Milani -
Toke Høiland-Jørgensen