mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	RabbitMQ: Update repositories (#7689)
* Update repos * Update * Update * Update
This commit is contained in:
		@@ -20,26 +20,40 @@ color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
    header_info
 | 
			
		||||
    check_container_storage
 | 
			
		||||
    check_container_resources
 | 
			
		||||
    if [[ ! -d /etc/rabbitmq ]]; then
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
    msg_info "Stopping ${APP} Service"
 | 
			
		||||
    systemctl stop rabbitmq-server
 | 
			
		||||
    msg_ok "Stopped ${APP} Service"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating..."
 | 
			
		||||
    $STD apt install --only-upgrade rabbitmq-server
 | 
			
		||||
    msg_ok "Update Successfully"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
    systemctl start rabbitmq-server
 | 
			
		||||
    msg_ok "Started ${APP}"
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /etc/rabbitmq ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  if grep -q "dl.cloudsmith.io" /etc/apt/sources.list.d/rabbitmq.list; then
 | 
			
		||||
    rm -f /etc/apt/sources.list.d/rabbitmq.list
 | 
			
		||||
    cat <<EOF >/etc/apt/sources.list.d/rabbitmq.list
 | 
			
		||||
## Modern Erlang/OTP releases
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
 | 
			
		||||
 | 
			
		||||
## Provides modern RabbitMQ releases
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
 | 
			
		||||
EOF
 | 
			
		||||
    $STD apt-get update
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  msg_info "Stopping ${APP} Service"
 | 
			
		||||
  systemctl stop rabbitmq-server
 | 
			
		||||
  msg_ok "Stopped ${APP} Service"
 | 
			
		||||
 | 
			
		||||
  msg_info "Updating..."
 | 
			
		||||
  $STD apt install --only-upgrade rabbitmq-server
 | 
			
		||||
  msg_ok "Update Successfully"
 | 
			
		||||
 | 
			
		||||
  msg_info "Starting ${APP}"
 | 
			
		||||
  systemctl start rabbitmq-server
 | 
			
		||||
  msg_ok "Started ${APP}"
 | 
			
		||||
  msg_ok "Updated Successfully"
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
@@ -49,4 +63,4 @@ description
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:15672${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:15672${CL}"
 | 
			
		||||
 
 | 
			
		||||
@@ -23,19 +23,17 @@ msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Adding RabbitMQ signing key"
 | 
			
		||||
curl -fsSL "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | gpg --dearmor >/usr/share/keyrings/com.rabbitmq.team.gpg
 | 
			
		||||
curl -fsSL "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key" | gpg --dearmor >/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg
 | 
			
		||||
curl -fsSL "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key" | gpg --dearmor >/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg
 | 
			
		||||
msg_ok "Signing keys added"
 | 
			
		||||
 | 
			
		||||
msg_info "Adding RabbitMQ repository"
 | 
			
		||||
cat <<EOF >/etc/apt/sources.list.d/rabbitmq.list
 | 
			
		||||
## Provides modern Erlang/OTP releases from a Cloudsmith mirror
 | 
			
		||||
deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main
 | 
			
		||||
deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main
 | 
			
		||||
## Modern Erlang/OTP releases
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
 | 
			
		||||
 | 
			
		||||
## Provides RabbitMQ from a Cloudsmith mirror
 | 
			
		||||
deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main
 | 
			
		||||
deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main
 | 
			
		||||
## Provides modern RabbitMQ releases
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
 | 
			
		||||
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
 | 
			
		||||
EOF
 | 
			
		||||
msg_ok "RabbitMQ repository added"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user