From f62a643156b18f2ee0959a27c44be60808b9e40d Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Mon, 27 Aug 2018 14:13:04 -0500 Subject: [PATCH 1/3] Change build path to a proper build location --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b9d788b3b94d..2d4cf7bdb1e8 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ if [ "$1" == "development" ]; then fi cd $ROOTPATH -curl -fSL "https://s3.amazonaws.com/rocketchatbuild/rocket.chat-develop.tgz" -o rocket.chat.tgz +curl -fSL "https://releases.rocket.chat/latest/download/" -o rocket.chat.tgz tar zxf rocket.chat.tgz && rm rocket.chat.tgz cd $ROOTPATH/bundle/programs/server npm install From c29341028d05beb0d37a4025739dab54b66fb748 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Mon, 27 Aug 2018 14:28:33 -0500 Subject: [PATCH 2/3] add gpg check --- install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2d4cf7bdb1e8..47625dfafb08 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,19 @@ if [ "$1" == "development" ]; then fi cd $ROOTPATH -curl -fSL "https://releases.rocket.chat/latest/download/" -o rocket.chat.tgz +gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 + +curl -SLf "https://releases.rocket.chat/latest/download/" -o rocket.chat.tgz +curl -SLf "https://releases.rocket.chat/latest/asc" -o rocket.chat.tgz.asc \ + +gpg --verify rocket.chat.tgz.asc +if [ $? -eq 0 ]; then + echo "Verified download integrity" +else + echo "Invalid file, download corrupted or incomplete" + exit 1 +fi + tar zxf rocket.chat.tgz && rm rocket.chat.tgz cd $ROOTPATH/bundle/programs/server npm install From 971396a5eb05a6e3d4675eb86f345f78bda14ca5 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Mon, 27 Aug 2018 14:29:18 -0500 Subject: [PATCH 3/3] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 47625dfafb08..f1cc8026fa71 100755 --- a/install.sh +++ b/install.sh @@ -24,7 +24,7 @@ else exit 1 fi -tar zxf rocket.chat.tgz && rm rocket.chat.tgz +tar zxf rocket.chat.tgz && rm rocket.chat.tgz rocket.chat.tgz.asc cd $ROOTPATH/bundle/programs/server npm install pm2 startOrRestart $ROOTPATH/current/$PM2FILE