Fix karen

This commit is contained in:
Aaron Dewes 2021-11-27 11:50:34 +00:00
parent 95b78e47d9
commit a593c96393
2 changed files with 19 additions and 17 deletions

View File

@ -63,8 +63,7 @@ services:
ipv4_address: $NGINX_IP
bitcoin:
container_name: bitcoin
#image: lncm/bitcoind:v22.0@sha256:37a1adb29b3abc9f972f0d981f45e41e5fca2e22816a023faa9fdc0084aa4507
image: nolim1t/bitcoinknots:v22.0.knots20211108@sha256:a475da2b2ecda55fcc65ea23e1a36c58b2c10549f1c3d3bb3c31c7dda1127354
image: lncm/bitcoind:v22.0@sha256:37a1adb29b3abc9f972f0d981f45e41e5fca2e22816a023faa9fdc0084aa4507
depends_on:
- tor
- manager
@ -109,7 +108,7 @@ services:
ipv4_address: $DASHBOARD_IP
manager:
container_name: manager
image: ghcr.io/runcitadel/manager:main@sha256:b79571dea3e9b1115057c89c5ba7c49ccbfba3d21d24f0fee11535603d9d448b
image: ghcr.io/runcitadel/manager:main@sha256:26a021cff33d9f81217b1810a743024d5a7a03493abbec766dd88680720d7102
depends_on:
- tor
- redis

31
karen
View File

@ -55,26 +55,29 @@ fi
echo "karen will start in 30 seconds"
sleep 30
echo "karen is running in $root_dir"
fswatch -0 --event=AttributeModified $signal_dir | while read -d "" event; do
fswatch -0 --event=PlatformSpecific $signal_dir | while read -d "" event; do
signal="${event#"$signal_dir"}"
signal="${signal#"/"}"
trigger="$trigger_dir/$signal"
args=""
echo "Got signal: $signal"
# If signal isn't an empty string, then it's a signal
if [[ -n "$signal" ]]; then
echo "Got signal: $signal"
# If the signal starts wih app-, the trigger is "$trigger_dir/app"
# and the args are the rest of the signal
if [[ "$signal" =~ ^app- ]]; then
trigger="$trigger_dir/app"
args="${signal#"app-"}"
fi
if test -x "$trigger"; then
echo "karen is getting triggered!"
if [[ ! -f "statuses/update-in-progress" ]]; then
"$trigger" $args &
# If the signal starts wih app-, the trigger is "$trigger_dir/app"
# and the args are the rest of the signal
if [[ "$signal" =~ ^app- ]]; then
trigger="$trigger_dir/app"
args="${signal#"app-"}"
fi
if test -x "$trigger"; then
echo "karen is getting triggered!"
if [[ ! -f "statuses/update-in-progress" ]]; then
"$trigger" $args &
fi
else
echo "No trigger found"
fi
else
echo "No trigger found"
fi
done