Skip to content

Instantly share code, notes, and snippets.

@10sr
Last active August 29, 2015 13:55
Show Gist options
  • Save 10sr/8753923 to your computer and use it in GitHub Desktop.
Save 10sr/8753923 to your computer and use it in GitHub Desktop.
[Unit]
Description=Network connectivity (eth0)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth0.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ip link set dev eth0 up
ExecStart=/usr/bin/ip addr add 133.11.238.38/25 broadcast 133.11.238.127 dev eth0
ExecStart=/usr/bin/ip route add default via 133.11.238.1
ExecStop=/usr/bin/ip addr flush dev ech0
ExecStop=/usr/bin/ip link set dev eth0 down
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment