16 lines
571 B
Bash
Executable File
16 lines
571 B
Bash
Executable File
#!/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/sage/projects/hvacker || exit 1
|
|
whereis npm
|
|
npm start | while read line; do
|
|
echo "$line"
|
|
if [[ "$line" == *"app http request failed getaddrinfo ENOTFOUND slack.com"* ]] ||
|
|
[[ "$line" == *"node:internal/errors"* ]] ||
|
|
[[ "$line" == *"Cannot set headers after"* ]]; then
|
|
systemctl restart hvacker
|
|
exit 1
|
|
fi
|
|
done
|