Proxmox VM auto start VM after found in shutdown state Rumi, July 30, 2021July 30, 2021 I was having this strange issue, where a running busy VM stopeed all of a sudden due to high CPU or Memory overload issue. So manually had to start everythime. In order to avoid this, created a small script to start the VM in case if it’s down. #!/bin/bash # Set environment PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin su - if [[ $(qm status 101) = *"status: stopped"* ]]; then echo `qm start 101` fi Related Proxmox Scripts Proxmox
Table alternate row background color using javascript July 4, 2011January 12, 2016 The code itself speaks….!!! <html> <head> <title>Alternative table row color using javascript.</title> <script language=”javascript”> function setcolor() { var tbl = document.getElementById(“tblCountry”); tbl.style.color = “white”; tbl.rows[0].style.backgroundColor = “green”; for (var i = 1; i < tbl.rows.length; i++) { if (i % 2 == 0) tbl.rows[i].style.backgroundColor = “gray”; else tbl.rows[i].style.backgroundColor = “brown”; } } </script> </head> <body onload=”setcolor();”> <table align=”center” width=”300px” id=”tblCountry”> <tr> <th> Country </th> </tr> <tr> <td> Australia </td> </tr> <tr> <td> China </td> </tr> <tr> <td> Denmark </td> </tr> <tr> <td> India </td> </tr> <tr> <td>… Read More
WordPress Backup Script August 23, 2020 #!/bin/bash # This script creates a compressed backup archive of the given directory and the given MySQL table. More details on implementation here: https://theme.fm # Feel free to use this script wherever you want, however you want. We produce open source, GPLv2 licensed stuff. # Author: Konstantin Kovshenin exclusively for… Read More
EOT তৈরির কৌশল April 16, 2010April 6, 2013 আমি অনেকদিন থেকেই এটি অনুভব করছিলাম যে, EOT তৈরির ধাপগুলি সঠিকভাবে বর্ণনা করে একটি লেখা তৈরি করবো। আমি দেখেছি অনেকেই সমস্যায় পড়েন। বুঝতে পারেন না কিভাবে এগোবেন। EOT তৈরি করতে পারলেও দেখা যায় তার পারফরমেন্স ভালো না। বুঝতে পারেন না কোথায় সমস্যা হয়েছিলো। আর এই চিন্তা থেকেই এই লেখাটি শুরু… Read More
You can put the script anywhere with the executable permission. What I did later to add it on the cron to check the status in every 5 mins. Reply
To launch automatically you must add with the crontab -e : * * * * * bash [the name of the directory where your script is] example bash /usr/local/sbin/[name of the script] Reply