#!/bin/bash

APP_DIR=/var/app/lucaschmid.net/

while RES=$(inotifywait -e create $APP_DIR --format %f); do
  if [[ "restart" == $(basename ${RES}) ]]; then
    cd ${APP_DIR} && \
      rm restart && \
      git pull && \
      docker-compose restart
  fi
done


#!/bin/bash

APP_DIR=/var/app/lucaschmid.net/

while RES=$(inotifywait -e create $APP_DIR --format %f); do
  if [[ "restart" == $(basename ${RES}) ]]; then
    rm ${APP_DIR}restart
    cd ${APP_DIR} && \
      git pull && \
      docker-compose restart
  fi
done


Remove restart first after restart hook
Remove restart first after restart hook
