Add startup script

This commit is contained in:
Sage Vaillancourt 2023-12-05 20:34:12 -05:00
parent 7c70ae80cb
commit 5041ae8e82
1 changed files with 13 additions and 0 deletions

13
script.sh Executable file
View File

@ -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