feat: moved gitea terraform to this repository
This commit is contained in:
23
image/scripts/push.sh
Normal file
23
image/scripts/push.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
GITEA_PROCESS="$(pgrep gitea)"
|
||||
|
||||
# Stop Gitea.
|
||||
echo "Stopped Gitea..."
|
||||
kill -STOP "$GITEA_PROCESS"
|
||||
|
||||
# Archive Gitea data.
|
||||
echo "Archiving..."
|
||||
cd /var/lib/gitea
|
||||
tar cfJ ../archive.tar.xz .
|
||||
cd ..
|
||||
|
||||
# Upload to S3.
|
||||
echo "Uploading..."
|
||||
aws s3 cp archive.tar.xz "$BOOT_URI"
|
||||
|
||||
# Restart Gitea.
|
||||
kill -CONT "$GITEA_PROCESS"
|
||||
echo "Restarted Gitea!"
|
||||
Reference in New Issue
Block a user