-#!/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"
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