feat: prod cli switch
This commit is contained in:
parent
a7053c5764
commit
72a68d042b
1 changed files with 8 additions and 2 deletions
10
copy.sh
10
copy.sh
|
@ -1,5 +1,11 @@
|
|||
#!/bin/ash
|
||||
|
||||
_target_domain="cutei.j4ne.de"
|
||||
if [ "$1" == "prod" ]; then
|
||||
_target_domain="prod.cloud.j4ne.de"
|
||||
fi
|
||||
# TODO: track deleted files or convert to APKBUILD
|
||||
|
||||
_source644="
|
||||
etc/apk/world
|
||||
etc/caddy/Caddyfile
|
||||
|
@ -48,5 +54,5 @@ cd "$pkgdir"
|
|||
tar -czf "$result" *
|
||||
cd "$startdir"
|
||||
|
||||
scp "$result" root@prod.cloud.j4ne.de:/root/files.tar.gz
|
||||
ssh root@prod.cloud.j4ne.de tar -xf '~/files.tar.gz' --no-same-owner -C /
|
||||
scp "$result" root@"$_target_domain":/root/files.tar.gz
|
||||
ssh root@"$_target_domain" tar -xf '~/files.tar.gz' --no-same-owner -C /
|
||||
|
|
Loading…
Add table
Reference in a new issue