diff options
author | Lukas Winkler <git@lw1.at> | 2021-03-04 11:34:18 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-03-04 12:08:02 +0100 |
commit | a5ea2aeaf03685a39af759829cb5417d2ef93998 (patch) | |
tree | b188aae1472c665874987fafb521e66d709b6cd8 /scripts/upgrade.sh | |
parent | 4468e1e4f77876e8a05b355b3482c425559c6f4f (diff) | |
download | PeerTube-a5ea2aeaf03685a39af759829cb5417d2ef93998.tar.gz PeerTube-a5ea2aeaf03685a39af759829cb5417d2ef93998.tar.zst PeerTube-a5ea2aeaf03685a39af759829cb5417d2ef93998.zip |
use .load instead of .safeLoad in js-yaml
Diffstat (limited to 'scripts/upgrade.sh')
-rwxr-xr-x | scripts/upgrade.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 425d19c06..f5f3219af 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh | |||
@@ -35,10 +35,10 @@ fi | |||
35 | if [ -x "$(command -v pg_dump)" ] | 35 | if [ -x "$(command -v pg_dump)" ] |
36 | then | 36 | then |
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').safeLoad(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').safeLoad(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').safeLoad(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').safeLoad(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 | mkdir -p $PEERTUBE_PATH/backup | 42 | mkdir -p $PEERTUBE_PATH/backup |
43 | PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "peertube${DB_SUFFIX}" -f "$SQL_BACKUP_PATH" | 43 | PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "peertube${DB_SUFFIX}" -f "$SQL_BACKUP_PATH" |
44 | else | 44 | else |