Skip to content

Instantly share code, notes, and snippets.

@klondikemarlen
klondikemarlen / app-restart-watcher.sh
Created February 26, 2020 16:45
Local file watcher to restart docker container.
#!/usr/bin/env bash
restart_app () {
local app_name="$1"
# consider pinging the server an only sending this if it is alive?
docker kill --signal="SIGUSR1" "$app_name" &> /dev/null
}
# Note: using -qq option with inotify will kill all events. So don't do that :p
app_restart_watcher () {