feat: prod cli switch

This commit is contained in:
jane400 2025-01-23 16:29:13 +01:00
parent a7053c5764
commit 72a68d042b

10
copy.sh
View file

@ -1,5 +1,11 @@
#!/bin/ash #!/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=" _source644="
etc/apk/world etc/apk/world
etc/caddy/Caddyfile etc/caddy/Caddyfile
@ -48,5 +54,5 @@ cd "$pkgdir"
tar -czf "$result" * tar -czf "$result" *
cd "$startdir" cd "$startdir"
scp "$result" root@prod.cloud.j4ne.de:/root/files.tar.gz scp "$result" root@"$_target_domain":/root/files.tar.gz
ssh root@prod.cloud.j4ne.de tar -xf '~/files.tar.gz' --no-same-owner -C / ssh root@"$_target_domain" tar -xf '~/files.tar.gz' --no-same-owner -C /