mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Improves install and upgrade
This commit is contained in:
parent
dcf19ed86d
commit
30f053ea26
2 changed files with 14 additions and 10 deletions
|
@ -78,10 +78,7 @@ sudo cp ../conf/nginx.conf "$nginx_conf"
|
|||
# download and extract rocketchat
|
||||
echo "Downloading rocket.chat-$ROCKETCHAT_VERSION.gtar from https://rocket.chat/releases/${ROCKETCHAT_VERSION}/download."
|
||||
sudo curl -s -L -o $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar "https://rocket.chat/releases/${ROCKETCHAT_VERSION}/download"
|
||||
sudo tar -xzf $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar -C $final_path
|
||||
sudo ls -lah $final_path
|
||||
sudo mv $final_path/bundle/** $final_path
|
||||
sudo mv $final_path/bundle/.node_version.txt $final_path
|
||||
sudo tar -xzf $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar -C $final_path --strip-components=1 bundle
|
||||
|
||||
cd $final_path/programs/server/
|
||||
|
||||
|
|
|
@ -12,15 +12,22 @@ source /usr/share/yunohost/helpers
|
|||
ROCKETCHAT_VERSION=0.57.2
|
||||
NODE_VERSION=4.7.1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
final_path="/var/www/$app"
|
||||
|
||||
# remove old things
|
||||
sudo systemctl stop Rocketchat.service
|
||||
sudo m -rf $final_path
|
||||
sudo mkdir $final_path
|
||||
|
||||
sudo m -rf /var/www/rocketchat/*
|
||||
|
||||
# install newer node version
|
||||
sudo n $NODE_VERSION
|
||||
|
||||
# download and extract rocketchat
|
||||
cd /tmp && curl -sO https://rocket.chat/releases/$ROCKETCHAT_VERSION/download
|
||||
cd $final_path && gunzip -c /tmp/rocket.chat-$ROCKETCHAT_VERSION.gtar | tar xvf -
|
||||
cd $final_path && rm -r PaxHeader && mv bundle/** .
|
||||
# download install newer rocketchat version
|
||||
echo "Downloading rocket.chat-$ROCKETCHAT_VERSION.gtar from https://rocket.chat/releases/${ROCKETCHAT_VERSION}/download."
|
||||
sudo curl -s -L -o $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar "https://rocket.chat/releases/${ROCKETCHAT_VERSION}/download"
|
||||
sudo tar -xzf $final_path/rocket.chat-$ROCKETCHAT_VERSION.gtar -C $final_path --strip-components=1 bundle
|
||||
cd $final_path/programs/server/
|
||||
sudo npm install
|
||||
|
||||
sudo systemctl start Rocketchat.service
|
||||
|
|
Loading…
Reference in a new issue