From 5041ae8e827d5e72f389c0f75d40fa6467902f6e Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 5 Dec 2023 20:34:12 -0500 Subject: [PATCH] Add startup script --- script.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 script.sh diff --git a/script.sh b/script.sh new file mode 100755 index 0000000..bae4375 --- /dev/null +++ b/script.sh @@ -0,0 +1,13 @@ +#!/bin/bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +cd /home/sagevaillancourt/git/hvacker +whereis npm +npm start | while read line; do + echo "$line" + if [[ "$line" == *"app http request failed getaddrinfo ENOTFOUND slack.com"* ]]; then + systemctl restart hvacker + exit 1 + fi +done