Automate mount directory

by GarciaPL on Tuesday 7 May 2013

I would like to introduce a small script written in Python which allows to automate mount unmounted specified directory. Script can be placed in crontab. User should define command, password which is required for this command, path to directory which should be mounted and expected text as usual after executing specified command. You can also make further adjustments of script if your command does not need for instance password.

Script uses modules :

  • pexpect
  • time
  • datetime
  • os
https://pastebin.com/7gHaMmeR