Created
July 30, 2017 00:13
-
-
Save glitsj16/43a0572dbb613be9d5c42a02b3992911 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
/etc/udev/rules.d/60-ios.rules | |
= = = = = = = = = = = = = = = = = = = | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", RUN+="/etc/mikkel/ios mount" | |
ACTION=="remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", RUN+="/etc/mikkel/ios unmount" | |
/etc/mikkel/ios | |
= = = = = = = = = = | |
#!/bin/sh | |
# | |
## called from /etc/udev/rules.d/60-ios.rules | |
systemctl start ios-${1}.service > /dev/null 2>&1 | |
exit 0 | |
/etc/systemd/system/ios-mount | |
= = = = = = = = = = = = = = = = = = = = = | |
[Unit] | |
Description=Mount IOS | |
RequiresMountsFor=/home/ | |
[Service] | |
User=mikkel | |
Type=oneshot | |
ExecStart=/home/mikkel/usr/bin/ios_script mount | |
/etc/systemd/system/ios-umount | |
= = = = = = = = = = = = = = = = = = = = = | |
[Unit] | |
Description=Unmount IOS | |
RequiresMountsFor=/home/ | |
[Service] | |
User=mikkel | |
Type=oneshot | |
ExecStart=/home/mikkel/usr/bin/ios_script unmount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment