-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# Navigate to the website folder on the remote server and clear contents of the website folder | ||
ssh arm1 'cd ~/traefik-proxy/apps/nmc-nginx-with-volume/website && \ | ||
echo "Listing files before clearing:" && \ | ||
echo "List before clearing:" && \ | ||
ls && \ | ||
echo "Count before clearing:" && \ | ||
ls -l | grep -v ^l | wc -l && \ | ||
echo "Clearing contents of the folder..." && \ | ||
rm -rf * && \ | ||
echo "List after clearing:" && \ | ||
ls && \ | ||
echo "Count after clearing:" && \ | ||
ls -l | grep -v ^l | wc -l && \ | ||
echo "Copying new contents..."' | ||
|
||
# Copy new contents | ||
scp -rq ./dist/* arm1:~/traefik-proxy/apps/nmc-nginx-with-volume/website | ||
# rsync -az --progress ./dist/* arm1:~/traefik-proxy/apps/nmc-nginx-with-volume/website | ||
|
||
|
||
# List all files after copying | ||
ssh arm1 'cd ~/traefik-proxy/apps/nmc-nginx-with-volume/website && \ | ||
echo "List after copying:" && \ | ||
ls && \ | ||
echo "Count after copying:" && \ | ||
ls -l | grep -v ^l | wc -l' | ||
|
||
|
||
|