mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-30 12:33:56 -06:00
Merge branch 'release/3.2.0' into develop
This commit is contained in:
commit
4d7ce9218a
@ -33,15 +33,15 @@ fi
|
||||
|
||||
# Backup database
|
||||
if [ -x "$(command -v pg_dump)" ]
|
||||
then
|
||||
SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"
|
||||
then
|
||||
SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"
|
||||
DB_USER=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['username'])")
|
||||
DB_PASS=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['password'])")
|
||||
DB_HOST=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['hostname'])")
|
||||
DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])")
|
||||
DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')")
|
||||
mkdir -p $PEERTUBE_PATH/backup
|
||||
PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-'peertube${DB_SUFFIX}'}" -f "$SQL_BACKUP_PATH"
|
||||
PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-peertube${DB_SUFFIX}}" -f "$SQL_BACKUP_PATH"
|
||||
else
|
||||
echo "pg_dump not found. Cannot make a SQL backup!"
|
||||
fi
|
||||
@ -72,7 +72,7 @@ rm -f "peertube-${VERSION}.zip"
|
||||
rm -rf $PEERTUBE_PATH/peertube-latest
|
||||
ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest
|
||||
cd $PEERTUBE_PATH/peertube-latest
|
||||
yarn install --production --pure-lockfile
|
||||
yarn install --production --pure-lockfile
|
||||
cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml
|
||||
|
||||
echo "Differences in configuration files..."
|
||||
|
Loading…
Reference in New Issue
Block a user