sed -i.bak "s/data.status !== 'Active'/false/g" \
/usr/share/pve-manager/js/pvemanagerlib.js \
/usr/share/pve-manager/touch/pvemanager-mobile.js
Watcher
#!/bin/bash | |
# | |
# VM_HOOK = [ | |
# name = "time_restore", | |
# on = "RUNNING", | |
# state = "ACTIVE", | |
# lcm_state = "BOOT_SUSPENDED", | |
# command = "time_restore.sh", | |
# arguments = "$ID $TEMPLATE" ] |
--- /usr/share/kolab-webadmin/lib/kolab_client_task.php.bak 2016-10-17 18:30:42.341922652 +0300 | |
+++ /usr/share/kolab-webadmin/lib/kolab_client_task.php 2016-10-17 18:30:17.975488877 +0300 | |
@@ -260,6 +260,16 @@ | |
die; | |
} | |
else { | |
+// Log fail attemts for Fail2ban ############## | |
+ $logfile = "/var/log/kolab-webadmin/auth_fail.log"; | |
+ if($logfh = fopen($logfile, 'a')) { | |
+ $date = date("[d/M/Y:H:i:s O]"); |
#!/bin/bash | |
REPEAT=120 #2 minutes | |
# Wait for file | |
until [ -f "$1" ]; do | |
sleep 1 | |
# Timeout check | |
if [ "$REPEAT" -gt 0 ]; then |
#!/bin/bash | |
UUID=$1 | |
KEYRING=$2 | |
cat > /tmp/secret.xml <<EOT | |
<secret ephemeral='no' private='no'> | |
<uuid>$UUID</uuid> | |
<usage type='ceph'> | |
<name>client.libvirt secret</name> |
#!/bin/bash | |
# Wait for file | |
until [ -f "$1" ]; do sleep 5 ; done | |
# Remove exist hostname | |
sed -i '/ '$(hostname)'$/d' "$1" 2> /dev/null | |
# Write new hostname | |
echo "$(ip addr list | grep -oP '(?<=inet )([0-9]+.){3}[0-9]+' | tail -n1) $(hostname)" >> "$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 | |
# | |
# Usage: | |
# swap_to_bridge.sh [bridge_name] | |
# | |
set -x | |
#mount -o remount,exec /tmp | |
R=/tmp/root | |
INTERFACE="$(ip route | grep -v '^default' | grep -oP -m1 '(?<=dev )[^ ]*')" |
#!/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 |
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 |