Public paste
Undefined
By: Guest | Date: Jul 7 2016 16:55 | Format: None | Expires: never | Size: 368 B | Hits: 756

  1. #!/bin/bash
  2. touch /home/user/.docker
  3. chown user: /home/user/.docker
  4. while : ; do
  5.         inotifywait -e close_write /home/user/.docker &>/dev/null
  6.         x=$(</home/user/.docker)
  7.         if [ "$x" ] && grep -qFx "$x" /root/docker.allowed ; then
  8.                 docker start "$x"                                
  9.         fi
  10.         > /home/user/.docker
  11. done
  12.