Last active
February 23, 2018 09:44
-
-
Save joacar/44df63faf7c23f8a48a9841eba1930e0 to your computer and use it in GitHub Desktop.
Script to copy content from VSTS Agent release artificat to web folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir=/var/<app> | |
src=/home/user/vstsagent/_work/r1/a/<app>/drop/<app>.zip | |
service=<app>.service | |
# Clear directory | |
echo "Remove content from '$dir'" | |
rm -r $dir >> /dev/null | |
# Copy content | |
echo "Unzip file content '$src' to '$dir'" | |
unzip -o $src -d $dir >> /dev/null | |
# Restart servcice | |
echo "Restarting service '$service'" | |
sudo systemctl restart $service | |
sudo systemctl status $service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment