Skip to content

Commit 3aff0d9

Browse files
authored
RabbitMQ: Update repositories (#7689)
* Update repos * Update * Update * Update
1 parent 7cd3326 commit 3aff0d9

File tree

2 files changed

+40
-28
lines changed

2 files changed

+40
-28
lines changed

ct/rabbitmq.sh

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,40 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
header_info
24-
check_container_storage
25-
check_container_resources
26-
if [[ ! -d /etc/rabbitmq ]]; then
27-
msg_error "No ${APP} Installation Found!"
28-
exit
29-
fi
30-
msg_info "Stopping ${APP} Service"
31-
systemctl stop rabbitmq-server
32-
msg_ok "Stopped ${APP} Service"
33-
34-
msg_info "Updating..."
35-
$STD apt install --only-upgrade rabbitmq-server
36-
msg_ok "Update Successfully"
37-
38-
msg_info "Starting ${APP}"
39-
systemctl start rabbitmq-server
40-
msg_ok "Started ${APP}"
41-
msg_ok "Updated Successfully"
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /etc/rabbitmq ]]; then
27+
msg_error "No ${APP} Installation Found!"
4228
exit
29+
fi
30+
if grep -q "dl.cloudsmith.io" /etc/apt/sources.list.d/rabbitmq.list; then
31+
rm -f /etc/apt/sources.list.d/rabbitmq.list
32+
cat <<EOF >/etc/apt/sources.list.d/rabbitmq.list
33+
## Modern Erlang/OTP releases
34+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
35+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
36+
37+
## Provides modern RabbitMQ releases
38+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
39+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
40+
EOF
41+
$STD apt-get update
42+
fi
43+
44+
msg_info "Stopping ${APP} Service"
45+
systemctl stop rabbitmq-server
46+
msg_ok "Stopped ${APP} Service"
47+
48+
msg_info "Updating..."
49+
$STD apt install --only-upgrade rabbitmq-server
50+
msg_ok "Update Successfully"
51+
52+
msg_info "Starting ${APP}"
53+
systemctl start rabbitmq-server
54+
msg_ok "Started ${APP}"
55+
msg_ok "Updated Successfully"
56+
exit
4357
}
4458

4559
start
@@ -49,4 +63,4 @@ description
4963
msg_ok "Completed Successfully!\n"
5064
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
5165
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
52-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:15672${CL}"
66+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:15672${CL}"

install/rabbitmq-install.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@ msg_ok "Installed Dependencies"
2323

2424
msg_info "Adding RabbitMQ signing key"
2525
curl -fsSL "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | gpg --dearmor >/usr/share/keyrings/com.rabbitmq.team.gpg
26-
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
27-
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
2826
msg_ok "Signing keys added"
2927

3028
msg_info "Adding RabbitMQ repository"
3129
cat <<EOF >/etc/apt/sources.list.d/rabbitmq.list
32-
## Provides modern Erlang/OTP releases from a Cloudsmith mirror
33-
deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main
34-
deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main
30+
## Modern Erlang/OTP releases
31+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
32+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-erlang/debian/bookworm bookworm main
3533
36-
## Provides RabbitMQ from a Cloudsmith mirror
37-
deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main
38-
deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main
34+
## Provides modern RabbitMQ releases
35+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb1.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
36+
deb [arch=amd64 signed-by=/usr/share/keyrings/com.rabbitmq.team.gpg] https://deb2.rabbitmq.com/rabbitmq-server/debian/bookworm bookworm main
3937
EOF
4038
msg_ok "RabbitMQ repository added"
4139

0 commit comments

Comments
 (0)