Преглед на файлове

Update build.func

Check if the Monitor-All service is currently active. If it is, stop the service until the creation process is complete. Once the creation process is finished, start the Monitor-All service again.
tteckster преди 2 години
родител
ревизия
e946f41890
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      misc/build.func

+ 6 - 0
misc/build.func

@@ -375,6 +375,9 @@ install_script() {
   ssh_check
   ssh_check
   arch_check
   arch_check
   pve_check
   pve_check
+  if systemctl is-active -q ping-instances.service; then
+  systemctl stop ping-instances.service
+  fi
   NEXTID=$(pvesh get /cluster/nextid)
   NEXTID=$(pvesh get /cluster/nextid)
   timezone=$(cat /etc/timezone)
   timezone=$(cat /etc/timezone)
   header_info
   header_info
@@ -508,4 +511,7 @@ description() {
   pct set "$CTID" -description "# ${APP} LXC
   pct set "$CTID" -description "# ${APP} LXC
   ### https://tteck.github.io/Proxmox/
   ### https://tteck.github.io/Proxmox/
   <a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/☕-Buy me a coffee-red' /></a>"
   <a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/☕-Buy me a coffee-red' /></a>"
+  if [[ -f /etc/systemd/system/ping-instances.service ]]; then
+  systemctl start ping-instances.service
+  fi
 }
 }