sed -i.bak "s/data.status !== 'Active'/false/g" \
/usr/share/pve-manager/js/pvemanagerlib.js \
/usr/share/pve-manager/touch/pvemanager-mobile.jsWatcher
| #!/bin/bash | |
| # onevm monitoring for zabbix script | |
| case $1 in | |
| a* ) echo $(onevm list -l STAT | tail -n +2 | wc -l) ;; | |
| r* ) echo $(onevm list -l STAT | tail -n +2 | grep 'runn\|boot' | wc -l) ;; | |
| su* ) echo $(onevm list -l STAT | tail -n +2 | grep 'susp\|save' | wc -l) ;; | |
| st* ) echo $(onevm list -l STAT | tail -n +2 | grep -v 'runn\|susp\|save\|boot\|err\|fail' | wc -l) ;; | |
| e* ) echo $(onevm list -l STAT | tail -n +2 | grep 'err\|fail' | wc -l) ;; | |
| * ) echo Need argument!; exit 1 ;; |
| #!/bin/bash | |
| CONTAINERS=($(docker ps | awk '{if(NR>1) print $NF}' | grep '_kolab_' )) | |
| ACMESH_URL="https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh" | |
| for i in ${CONTAINERS[@]}; do | |
| echo | |
| echo processing $i container: |
| #!/bin/bash | |
| LAST_KERNEL="$(ls -1h /lib/modules | tail -n1)" | |
| KERNEL="${1:-$LAST_KERNEL}" | |
| function finish { | |
| mv /opt/beegfs/src/client/beegfs_client_module_6/build/Makefile{.bak,} | |
| mv /etc/beegfs/beegfs-client-autobuild.conf{.bak,} | |
| } | |
| trap finish EXIT |
| wget http://repo.zabbix.com/zabbix/3.2/debian/pool/main/z/zabbix-release/zabbix-release_3.2-1+jessie_all.deb -O /tmp/zabbix-release_3.2-1+jessie_all.deb | |
| dpkg -i /tmp/zabbix-release_3.2-1+jessie_all.deb | |
| apt update | |
| apt -y install zabbix-agent | |
| sed -i 's/^# Timeout=3/# Timeout=3\n\nTimeout=10/' /etc/zabbix/zabbix_agentd.conf | |
| sed -i 's/^Hostname=Zabbix server/#Hostname=Zabbix server/' /etc/zabbix/zabbix_agentd.conf | |
| sed -i 's/^Server=127.0.0.1/Server=zabbix/' /etc/zabbix/zabbix_agentd.conf | |
| sed -i 's/^ServerActive=127.0.0.1/ServerActive=zabbix/' /etc/zabbix/zabbix_agentd.conf | |
| systemctl enable zabbix-agent | |
| systemctl restart zabbix-agent |
| systemctl stop corosync | |
| systemctl stop pve-cluster | |
| pmxcfs -l | |
| rm /etc/pve/corosync.conf | |
| rm /etc/corosync/authkey | |
| rm /etc/corosync/corosync.conf | |
| #reboot the server |
| #!/bin/bash | |
| #IMAGE_HOOK = [ | |
| # name = "iso_check", | |
| # on = "CREATE", | |
| # command = "iso_check.sh", | |
| # arguments = "$ID $TEMPLATE" ] | |
| IMAGE_ID="$1" | |
| TEMPLATE="$2" |
| $filter = "2k12R2\\amd64" | |
| $drive = ((Get-WMIObject Win32_Volume | ? { $_.Label -like "virtio*" }).Name) | |
| $drivers = (Get-ChildItem $drive -Filter *.inf -Recurse | % { $_.FullName } | Select-String $filter ) | |
| $drivers | %{pnputil -d $_ } |
| #!/bin/sh -e | |
| # | |
| # rc.local | |
| # | |
| # This script is executed at the end of each multiuser runlevel. | |
| # Make sure that the script will "exit 0" on success or any other | |
| # value on error. | |
| # | |
| # In order to enable or disable this script just change the execution | |
| # bits. |
| #!/bin/bash | |
| if [ -z $2 ]; then | |
| echo "USAGE: $(basename $0) <oldid> <newid>" | |
| exit 1 | |
| fi | |
| if [ ! -f /etc/pve/*/${1}.conf ]; then | |
| echo "vm or ct ${1} not found" | |
| exit 2 |