Skip to content

Instantly share code, notes, and snippets.

@sa7dse
Last active August 31, 2015 09:32
Show Gist options
  • Save sa7dse/d7ce0752853b70aa7e53 to your computer and use it in GitHub Desktop.
Save sa7dse/d7ce0752853b70aa7e53 to your computer and use it in GitHub Desktop.
systemd unit to run sysctls after network comes online
[Unit]
Description=Apply Kernel Variables after network
DefaultDependencies=no
Conflicts=shutdown.target
After=network-online.target
ConditionPathIsReadWrite=/proc/sys/
Wants=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-sysctl
TimeoutSec=90s
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment