mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fix upgrade
This commit is contained in:
parent
ad1a6fa198
commit
d4e2a2c773
1 changed files with 7 additions and 9 deletions
|
@ -18,13 +18,12 @@ serviceuser=$(ynh_app_setting_get $app serviceuser)
|
|||
path=$(ynh_app_setting_get $app path)
|
||||
port=$(ynh_app_setting_get $app port)
|
||||
|
||||
# download and extract rocketchat
|
||||
echo "Downloading rocket.chat-$ROCKETCHAT_VERSION.gtar from ${ROCKETCHAT_DOWNLOAD_URI}."
|
||||
sudo curl -s -L -o $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar "${ROCKETCHAT_DOWNLOAD_URI}"
|
||||
SHA_DOWNLOAD=$(sha256sum $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar | grep -o "^[a-f0-9]*")
|
||||
if [[ ! "$SHA_DOWNLOAD" == "$ROCKETCHAT_SHASUM" ]]; then
|
||||
ynh_die "The sha256sum does not match the configured one"
|
||||
fi
|
||||
#=================================================
|
||||
# BACKUP THE APPLICATION
|
||||
#=================================================
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade > >(tee "upgrade.log")
|
||||
|
||||
sudo systemctl stop rocketchat
|
||||
|
||||
|
@ -34,8 +33,7 @@ sudo mkdir -p $final_path
|
|||
# update to latest required node setup
|
||||
installnode
|
||||
|
||||
sudo tar -xzf $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar -C $final_path --strip-components=1 bundle
|
||||
sudo rm $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar
|
||||
ynh_setup_source "$final_path"
|
||||
|
||||
sudo chown -R $serviceuser: $final_path
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue