Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rocketchatctl
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,11 @@ get_rocketchat_latest_version(){
get_rocketchat_current_version(){
if systemctl status rocketchat > /dev/null 2>&1; then
PORT=$(cat /lib/systemd/system/rocketchat.service |grep PORT |awk -F= '{print $3}')
current_rocketchat_version=$(curl http://localhost:$PORT/api/info 2>/dev/null |cut -d\" -f4)
current_rocketchat_version=""
until [ -n "$current_rocketchat_version" ]; do
current_rocketchat_version=$(curl http://localhost:$PORT/api/info 2>/dev/null |cut -d\" -f4)
sleep 1
done
else
print_rocketchat_not_running_error_and_exit
fi
Expand Down