# ipr_scripts #### Table of Contents 1. [Overview](#overview) 2. [Scripts](#scripts) * [Proxmox](#proxmox) * [Grav](#grav) ## Overview Some usefull scripts for admin or users. ## Scripts ### Proxmox #### vzdump-hook-lxc-template.pl This script must be used as a vzdump's hook (the backup utility for CT and VMs for Proxmox). 1. The script will : * Remove the templates oldest than 2 days (by default). * Copy the current dump as a template in **/mnt/zfsbkp/template/cache** (by default). 2. How-to use : * Define a backup as usual (in the Proxmox's webgui) and prefer to select only one container. * In command on the hypervisor, open **/etc/pve/vzdump.cron** and edit the line of the new dump to add : **--script /usr/local/bin/vzdump-hook-lxc-template.pl**. 3. Customization : * If you don't store template in the default path (**/mnt/zfsbkp/template/cache**), please edit the variable **$TEMPLATE_DIR** in the script. ### Grav #### grav_cron A daily cron to check if [Grav][grav website] got available updates. * It need to work from the Grav's root directory. * If an update is available, it will create a empty file (${GRAV_ROOT}/logs/update), else it will ensure the "update" file is removed. * Be sure to monitore if **${GRAV_ROOT}/logs/update** exist. [grav website]: https://getgrav.org/