Created
May 22, 2020 04:34
-
-
Save naoki-mizuno/ed4d40b63af6b6d12fd06b753a16b459 to your computer and use it in GitHub Desktop.
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=ifup for NCXX USB Dongle (%I) | |
After=local-fs.target network-pre.target apparmor.service | |
Before=network.target | |
BindsTo=sys-subsystem-net-devices-%i.device | |
DefaultDependencies=no | |
IgnoreOnIsolate=yes | |
StopWhenUnneeded=yes | |
[Service] | |
# avoid stopping on shutdown via stopping system-ifup.slice | |
Slice=system.slice | |
ExecStart=/bin/sh -ec 'sleep 2; ifup --allow=hotplug %I; ifup --allow=auto %I; \ | |
if ifquery %I >/dev/null; then ifquery --state %I >/dev/null; fi' | |
ExecStop=/sbin/ifdown %I | |
RemainAfterExit=true | |
TimeoutStartSec=5min |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment