- 
      
 - 
        
Save Volyz/bac413ae3b70ddcd7b88388f8b5e90cd to your computer and use it in GitHub Desktop.  
    Systemd run script after mount
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | # original: https://askubuntu.com/questions/25071/how-to-run-a-script-when-a-specific-flash-drive-is-mounted | |
| # you can find your device unit with: sudo systemctl list-units -t mount | |
| # put this into /etc/systemd/system/your.service | |
| [Unit] | |
| Description=SharedMountTrigger | |
| Requires=mnt-shared.mount | |
| After=mnt-shared.mount | |
| [Service] | |
| ExecStart=/usr/local/bin/x-start-docker | |
| [Install] | |
| WantedBy=mnt-shared.mount | |
| # Then you have to start/enable the service: | |
| # sudo systemctl start your.service | |
| # sudo systemctl enable your.service | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment