]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - scripts/upgrade.sh
a0abe7ea61a7faaa2f899edb689c37c4d69d2db1
7 SQL_BACKUP_PATH
="/var/www/peertube/backup/sql-peertube_prod-$(date +\"%Y%m%d-%h%m\").bak"
8 mkdir -p /var
/www
/peertube
/backup
9 pg_dump
-U peertube
-W -h localhost
-F c peertube_prod
-f "$SQL_BACKUP_PATH"
11 # Get and Display the Latest Version
12 VERSION
=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4)
13 echo "Latest Peertube version is $VERSION"
14 wget
-q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" -O /var
/www
/peertube
/versions
/peertube
-${VERSION}.
zip
15 cd /var
/www
/peertube
/versions
16 unzip -o peertube
-${VERSION}.
zip
17 rm -f peertube
-${VERSION}.
zip
20 rm -rf /var
/www
/peertube
/peertube
-latest
21 ln -s /var
/www
/peertube
/versions
/peertube
-${VERSION} /var
/www
/peertube
/peertube
-latest
22 cd /var
/www
/peertube
/peertube
-latest
23 yarn
install --production --pure-lockfile
24 cp /var
/www
/peertube
/peertube
-latest/config
/default.yaml
/var
/www
/peertube
/config
/default.yaml
26 echo "Differences in configuration files..."
27 diff /var
/www
/peertube
/versions
/peertube
-${VERSION}/config
/production.yaml.example
/var
/www
/peertube
/config
/production.yaml