Created
April 25, 2013 06:01
-
-
Save anonymous/5457815 to your computer and use it in GitHub Desktop.
/etc/systemd/system/network.service
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] | |
Description=Wireless Static IP Connectivity | |
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=/sbin/ip link set dev eth0 up | |
ExecStart=/sbin/ip addr add 10.0.1.111/24 dev eth0 | |
ExecStart=/sbin/ip route add default via 10.0.1.1 | |
ExecStop=/sbin/ip addr flush dev eth0 | |
ExecStop=/sbin/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