1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00

Fix ynh die issue

This commit is contained in:
Selamanse 2019-01-25 22:58:05 +01:00
parent 549855b225
commit ddb62c10fd
2 changed files with 12 additions and 14 deletions

View file

@ -1,16 +1,14 @@
#!/bin/bash #!/bin/bash
set -eu set -eu
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
if [ ! -e _common.sh ]; then
# Fetch helpers file if not in current directory source ./_common.sh
sudo cp ../settings/scripts/_common.sh ./_common.sh
sudo chmod a+rx _common.sh
fi
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
source _common.sh
#================================================= #=================================================
# GENERIC START # GENERIC START

View file

@ -18,14 +18,6 @@ serviceuser=$(ynh_app_setting_get $app serviceuser)
path=$(ynh_app_setting_get $app path) path=$(ynh_app_setting_get $app path)
port=$(ynh_app_setting_get $app port) port=$(ynh_app_setting_get $app port)
sudo systemctl stop rocketchat
sudo rm -rf $final_path
sudo mkdir -p $final_path
# update to latest required node setup
installnode
# download and extract rocketchat # download and extract rocketchat
echo "Downloading rocket.chat-$ROCKETCHAT_VERSION.gtar from ${ROCKETCHAT_DOWNLOAD_URI}." 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}" sudo curl -s -L -o $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar "${ROCKETCHAT_DOWNLOAD_URI}"
@ -34,6 +26,14 @@ if [[ ! "$SHA_DOWNLOAD" == "$ROCKETCHAT_SHASUM" ]]; then
ynh_die "The sha256sum does not match the configured one" ynh_die "The sha256sum does not match the configured one"
fi fi
sudo systemctl stop rocketchat
sudo rm -rf $final_path
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 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 sudo rm $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar