Albumik 0.1.1 stable upgrade path
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
source ./_common.sh
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/_common.sh"
|
||||
|
||||
app="${YNH_APP_INSTANCE_NAME:-albumik}"
|
||||
|
||||
systemctl stop "$app" 2>/dev/null || true
|
||||
mkdir -p "$install_dir"
|
||||
|
||||
rm -rf "$install_dir/backend" "$install_dir/web" "$install_dir/doc"
|
||||
cp -a backend web doc "$install_dir"/
|
||||
|
||||
cp -a "$YNH_APP_BASEDIR/backend" "$YNH_APP_BASEDIR/web" "$YNH_APP_BASEDIR/doc" "$install_dir"/
|
||||
|
||||
chown -R "$app:$app" "$install_dir"
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl start "$app"
|
||||
systemctl reload nginx || true
|
||||
systemctl restart "$app"
|
||||
|
||||
nginx -t
|
||||
systemctl reload nginx
|
||||
|
||||
echo "Albumik upgraded"
|
||||
|
||||
Reference in New Issue
Block a user