14 SQL_BACKUP_PATH
="/var/www/peertube/backup/sql-peertube_prod-$(date -Im).bak"
16 pg_dump
-U peertube
-W -h localhost
-F c peertube_prod
-f "$SQL_BACKUP_PATH"
18 # Get and Display the Latest Version
19 VERSION
=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4)
20 echo "Latest Peertube version is $VERSION"
21 wget
-q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" -O ~
/versions
/peertube
-${VERSION}.
zip
23 unzip -o peertube
-${VERSION}.
zip
24 rm -f peertube
-${VERSION}.
zip
27 rm -rf ~
/peertube
-latest
28 ln -s ~
/versions
/peertube
-${VERSION} ~
/peertube
-latest
30 yarn
install --production --pure-lockfile
31 cp ~
/peertube
-latest/config
/default.yaml ~
/config
/default.yaml
32 diff ~
/peertube
-latest/config
/production.yaml.example ~
/config
/production.yaml