Browse Source

Update grafana.sh

fix for rotating keys
tteckster 2 năm trước cách đây
mục cha
commit
b2124be08f
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 6 3
      ct/grafana.sh

+ 6 - 3
ct/grafana.sh

@@ -52,11 +52,14 @@ function default_settings() {
 
 function update_script() {
 header_info
-if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
-msg_info "Updating ${APP} LXC"
+if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
+msg_info "Updating ${APP}"
+apt-key del 4E40DDF6D76E284A4A6780E48C8C34C524098CB6
+wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
+echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list
 apt-get update &>/dev/null
 apt-get -y upgrade &>/dev/null
-msg_ok "Updated ${APP} LXC"
+msg_ok "Updated ${APP}"
 msg_ok "Update Successfull"
 exit
 }