RocketChat / install.sh

command line tool to help you install and configure a RocketChat server in a Linux host
https://rocket.chat/docs/installation/rocketchatctl/
32 stars 33 forks source link

Attempt to use jq without making sure it is installed #55

Open m4z opened 2 years ago

m4z commented 2 years ago

The current version of rocketchatctl tries to use jq, which might not be installed:

# rocketchatctl update
Updates could be risky, you can use the backup option # rocketchatctl backup, to create a backup of the rocketchat database first. Please check that you have enough space in your system to store the backup.
Current update available for RocketChat server: from 4.4 to 4.5.0.
/usr/local/bin/rocketchatctl: line 1127: jq: command not found
(23) Failed writing body
  installing : node-v12.22.8
       mkdir : /usr/local/n/versions/node/12.22.8
       fetch : https://nodejs.org/dist/v12.22.8/node-v12.22.8-linux-x64.tar.xz
   installed : v12.22.8 (with npm 6.14.15)
Warning: rocketchat.service changed on disk. Run 'systemctl daemon-reload' to reload units.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[…]
xmedeko commented 2 years ago

Same for curl ... just print error and exit if curl or jq are not present. Do not make any auto installs, like apt-get install -y curl - it does not work on all systems anyway.