aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-28 15:54:48 +0200
committerChocobozzz <me@florianbigard.com>2021-05-28 15:54:48 +0200
commit4d7ce9218a3f695bf3d013cbdce1c5c6a5221927 (patch)
tree212ce0727fc2802eaad6903bee9e0552825454b1 /scripts
parent630421392314a4d78506f060055c754dfddf220b (diff)
parent86dc0b9cc9374cba7548bb613ff43d92f90570a8 (diff)
downloadPeerTube-4d7ce9218a3f695bf3d013cbdce1c5c6a5221927.tar.gz
PeerTube-4d7ce9218a3f695bf3d013cbdce1c5c6a5221927.tar.zst
PeerTube-4d7ce9218a3f695bf3d013cbdce1c5c6a5221927.zip
Merge branch 'release/3.2.0' into develop
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/upgrade.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index 64a7b18fd..12629ad65 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -33,15 +33,15 @@ fi
33 33
34# Backup database 34# Backup database
35if [ -x "$(command -v pg_dump)" ] 35if [ -x "$(command -v pg_dump)" ]
36then 36then
37 SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak" 37 SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"
38 DB_USER=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['username'])") 38 DB_USER=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['username'])")
39 DB_PASS=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['password'])") 39 DB_PASS=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['password'])")
40 DB_HOST=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['hostname'])") 40 DB_HOST=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['hostname'])")
41 DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])") 41 DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])")
42 DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')") 42 DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')")
43 mkdir -p $PEERTUBE_PATH/backup 43 mkdir -p $PEERTUBE_PATH/backup
44 PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-'peertube${DB_SUFFIX}'}" -f "$SQL_BACKUP_PATH" 44 PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-peertube${DB_SUFFIX}}" -f "$SQL_BACKUP_PATH"
45else 45else
46 echo "pg_dump not found. Cannot make a SQL backup!" 46 echo "pg_dump not found. Cannot make a SQL backup!"
47fi 47fi
@@ -72,7 +72,7 @@ rm -f "peertube-${VERSION}.zip"
72rm -rf $PEERTUBE_PATH/peertube-latest 72rm -rf $PEERTUBE_PATH/peertube-latest
73ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest 73ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest
74cd $PEERTUBE_PATH/peertube-latest 74cd $PEERTUBE_PATH/peertube-latest
75yarn install --production --pure-lockfile 75yarn install --production --pure-lockfile
76cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml 76cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml
77 77
78echo "Differences in configuration files..." 78echo "Differences in configuration files..."