chore(root): localize helper scripts

This commit is contained in:
Ben Allfree 2024-06-01 09:54:10 -04:00
parent 338ef3b172
commit bc87802120
6 changed files with 0 additions and 70 deletions

View File

@ -1,8 +0,0 @@
#!/bin/bash
# https://www.digitalocean.com/community/tutorials/how-to-create-let-s-encrypt-wildcard-certificates-with-certbot
certbot renew --dns-digitalocean --dns-digitalocean-credentials ~/certbot-creds.ini
cp /etc/letsencrypt/live/pockethost.io/fullchain.pem ./ssl
cp /etc/letsencrypt/live/pockethost.io/privkey.pem ./ssl
chown pockethost:pockethost -R ./ssl

View File

@ -1,25 +0,0 @@
#!/bin/bash
# Get all branches that start with 'feat/' and store them in an array
feat_branches=($(git branch --list 'feat/*' 'fix/*' | sed 's/ //'))
# Loop through each 'feat/' branch
for branch in "${feat_branches[@]}"; do
# Checkout the 'feat/' branch
git checkout "$branch"
# Merge 'master' into the 'feat/' branch
echo "Merging 'master' into '$branch'..."
git merge master
# Check if there are merge conflicts
if [ $? -ne 0 ]; then
echo "Merge conflict detected in '$branch'. Resolve the conflict and then press Enter to continue..."
read -p ""
fi
done
# Checkout master branch or the initial branch after completing the merges
git checkout master
echo "All 'feat/' branches have been processed."

View File

@ -1,27 +0,0 @@
#!/bin/bash
set -a
source .env
set +a
MOTHERSHIP_ROOT=$DAEMON_PB_DATA_DIR/$PUBLIC_PB_SUBDOMAIN
DATA_ROOT=$MOTHERSHIP_ROOT/pb_data
BACKUP_ROOT=$MOTHERSHIP_ROOT/backups
BACKUP_TARGET=$BACKUP_ROOT/`date +%s`
echo MOTHERSHIP_ROOT,$MOTHERSHIP_ROOT
echo BACKUP_ROOT,$BACKUP_ROOT
echo BACKUP_TARGET,$BACKUP_TARGET
echo DATA_ROOT,$DATA_ROOT
# Stop the service, make a backup, then restart
pm2 stop all
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
mkdir -p $BACKUP_TARGET
cp -r $DATA_ROOT $BACKUP_TARGET
rm $BACKUP_TARGET/pb_data/logs.*
./scripts/pm2.sh
tar -zcvf $BACKUP_TARGET.tgz $BACKUP_TARGET
rm -rf $BACKUP_TARGET

View File

@ -1,4 +0,0 @@
#!/bin/bash
# Used to back up to an encrypted drive
rsync -avz --progress --exclude 'logs.db' --exclude 'instance_logs.db' --exclude '*.db-shm' --exclude '*.db-wal' --exclude 'pb_data/types.d.ts' pockethost.io:/home/pockethost/data/ .pockethost/live-data

View File

@ -1,3 +0,0 @@
#!/bin/bash
du -sh live-data/* | sort -h

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo tail -f ~/data/pockethost-central/logs/exec.log | jq -r ".message"