]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/upgrade.sh
Update shebang and date to POSIX format for working on FreeBSD (not
[github/Chocobozzz/PeerTube.git] / scripts / upgrade.sh
old mode 100644 (file)
new mode 100755 (executable)
index e7c34a6..a0abe7e
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Strict mode
 set -e
 
 # Backup database
-SQL_BACKUP_PATH="/var/www/peertube/backup/sql-peertube_prod-$(date -Im).bak" 
+SQL_BACKUP_PATH="/var/www/peertube/backup/sql-peertube_prod-$(date +\"%Y%m%d-%h%m\").bak" 
 mkdir -p /var/www/peertube/backup
 pg_dump -U peertube -W -h localhost -F c peertube_prod -f "$SQL_BACKUP_PATH" 
 
@@ -23,4 +23,7 @@ cd  /var/www/peertube/peertube-latest
 yarn install --production --pure-lockfile 
 cp /var/www/peertube/peertube-latest/config/default.yaml /var/www/peertube/config/default.yaml
 
+echo "Differences in configuration files..."
+diff /var/www/peertube/versions/peertube-${VERSION}/config/production.yaml.example /var/www/peertube/config/production.yaml
+
 exit 0