Update deploy to match new systemd setup
Grezgorz now runs as a service on the user instance of systemd.
This commit is contained in:
parent
1fc402d911
commit
2f130874f7
12
deploy.bash
12
deploy.bash
@ -2,23 +2,23 @@
|
|||||||
# My little crappy deploy script
|
# My little crappy deploy script
|
||||||
# Uploads all files not ignored by git
|
# Uploads all files not ignored by git
|
||||||
|
|
||||||
TARGET=brzeczyszczykiewicz.pvv.ntnu.no
|
TARGET=grzegorz@brzeczyszczykiewicz.pvv.ntnu.no
|
||||||
TARGET_PATH='grzegorz'
|
TARGET_PATH='grzegorz'
|
||||||
|
|
||||||
array=(); while IFS= read -rd '' item; do array+=("$item"); done < \
|
array=(); while IFS= read -rd '' item; do array+=("$item"); done < \
|
||||||
<(git status -z --short | grep -z ^? | cut -z -d\ -f2-; git ls-files -z)
|
<(git status -z --short | grep -z ^? | cut -z -d\ -f2-; git ls-files -z)
|
||||||
files_not_ignored=("${array[@]}")
|
files_not_ignored=("${array[@]}")
|
||||||
|
|
||||||
ssh -T "grzegorz@$TARGET" "
|
ssh -T "$TARGET" "
|
||||||
rm -rf $TARGET_PATH
|
rm -rf $TARGET_PATH
|
||||||
mkdir -p $TARGET_PATH
|
mkdir -p $TARGET_PATH
|
||||||
"
|
"
|
||||||
|
|
||||||
tar -c "${files_not_ignored[@]}" |
|
tar -c "${files_not_ignored[@]}" |
|
||||||
ssh -T "grzegorz@$TARGET" "
|
ssh -T "$TARGET" "
|
||||||
tar -vxC $TARGET_PATH
|
tar -vxC $TARGET_PATH
|
||||||
"
|
"
|
||||||
ssh -T "root@$TARGET" "
|
|
||||||
systemctl restart grzegorz
|
ssh -T "$TARGET" "
|
||||||
systemctl status grzegorz
|
systemctl --user restart grzegorz@0
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user