Skip to content

Instantly share code, notes, and snippets.

@LuisPalacios
Last active April 30, 2023 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuisPalacios/647dc4190a3c9f80efe7188ac955cf87 to your computer and use it in GitHub Desktop.
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
#
# Unit systemd para gestión de PPP
# /etc/systemd/system/ppp_wait@.service
# 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