aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2022-12-30 09:32:43 +0000
committerMartin Ashby <martin@ashbysoft.com>2022-12-30 09:32:43 +0000
commit481255b0d4171bcff4aa4e49eb7c02943c2f7d78 (patch)
treedcdc4b969730817179be08d72ae59254f071109c
parent03d6d8f15825811bddf368732c22fc6a705a9d32 (diff)
downloadmfashby.net-481255b0d4171bcff4aa4e49eb7c02943c2f7d78.tar.gz
mfashby.net-481255b0d4171bcff4aa4e49eb7c02943c2f7d78.tar.bz2
mfashby.net-481255b0d4171bcff4aa4e49eb7c02943c2f7d78.tar.xz
mfashby.net-481255b0d4171bcff4aa4e49eb7c02943c2f7d78.zip
Update script for remote execution instead of local
-rwxr-xr-xrefresh.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/refresh.sh b/refresh.sh
index 9c753a0..542d4da 100755
--- a/refresh.sh
+++ b/refresh.sh
@@ -6,12 +6,14 @@ git pull
# Copy static site
hugo
-cp -r public/* /var/www/mfashby.net/
+scp -r public/* root@rpi3:/var/www/mfashby.net/
# build & install comments app
pushd comments
cargo build --release
-install -m755 target/release/comments /usr/local/bin/comments
-install -m755 comments.service /etc/systemd/system/comments.service
+scp target/release/comments root@rpi3:/usr/local/bin/comments
+scp comments.service root@rpi3:/etc/systemd/system/comments.service
+ssh root@rpi3 -C systemctl daemon-reload
+ssh root@rpi3 -C systemctl restart comments
popd
-systemctl restart comments
+