Last active
April 30, 2023 15:38
-
-
Save LuisPalacios/647dc4190a3c9f80efe7188ac955cf87 to your computer and use it in GitHub Desktop.
Unit systemd para gestión de sesión PPP esperando a que se establezca
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Unit systemd para gestión de PPP | |
# /etc/systemd/system/[email protected] | |
# by LuisPa 2015 | |
# | |
# Documento un caso de uso en este apunte: | |
# https://www.luispa.com/administración/2023/04/08/networking-avanzado.html | |
# | |
# Activar este servicio creando la configuración, p.ej: | |
# en /etc/ppp/peers/movistar | |
# | |
# systemctl enable ppp_wait@movistar | |
# | |
# Esta es la versión "updetach" que siginifica que se | |
# arranca el daemon PPP y se espera a que se establezca | |
# la sesión PPP antes de salir | |
# | |
# Hay que elegir entre usar ppp_wait o ppp_nowait, no | |
# tiene sentido habilitar ambos. | |
# | |
[Unit] | |
Description=PPP link to %I wait | |
#After=network.target systemd-networkd.service systemd-udevd.service | |
After=network-online.target | |
Wants=network-online.target | |
After=sys-subsystem-net-devices-vlan6.device | |
[Service] | |
Type=forking | |
PIDFile=/run/ppp-%i.pid | |
ExecStart=/usr/sbin/pppd call %I linkname %i updetach | |
Restart=on-failure | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment