git reimport
This commit is contained in:
50
deploy.sh
Executable file
50
deploy.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/zsh
|
||||
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
cd /home/misc-user/zvk
|
||||
|
||||
echo "Pulling"
|
||||
if git pull; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "-----"
|
||||
echo "-----Could not pull-----"
|
||||
echo "-----"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Restarting"
|
||||
if sudo /bin/systemctl restart a-zvk; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "-----"
|
||||
echo "-----Could not restart-----"
|
||||
echo "-----"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Waiting"
|
||||
sleep 3
|
||||
|
||||
echo "Checking"
|
||||
if sudo /bin/systemctl is-active a-zvk; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "-----"
|
||||
echo "-----Could not start up-----"
|
||||
echo "-----"
|
||||
sudo /bin/systemctl status a-zvk;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Deploy successful"
|
||||
|
||||
info=$'🤖 zvk change 🤖\n'$(git show --stat)
|
||||
|
||||
sleep 5
|
||||
|
||||
#curl -X POST -F "peer_id=9002294" -F "message=$info" localhost:32155/message/send
|
||||
|
||||
echo "Notification sent"
|
Reference in New Issue
Block a user