Skip to content

Instantly share code, notes, and snippets.

@MrLenin
MrLenin / vrrp-backup.sh
Last active February 4, 2024 22:22
Vyos VRRP Helper Scripts
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
VRRP_NEW_STATE=BACKUP
lock="/var/lock/vrrp-state"
@MrLenin
MrLenin / 1- Readme.txt
Last active March 28, 2024 00:53
Basic proxmox hookscript and cloud-init bootcmd to insert interface ip addresses into hosts file template
Can be useful for vm guests with dhcp assigned addresses, but can likely be extended to do almost
anything cloud-init can be used to do.
regenerate-cloud-init-data.pl is a hookscript that is attached to your vm template so that it
is present in the config for all VMs cloned from it. It is not likely suitable for environments
with multiple nodes as-is.
It is run prior to the starting of the VM and regenetates the vm-<id>-userconfig.yaml file from a
template containing the bootcmd and any other cloud-config data you wish to use. It also appends
configuration data to set the hostname (the VM name) and fqdn (configured in the script) of the VM.
@MrLenin
MrLenin / wsbconfig.ps1
Last active November 24, 2021 10:09
Windows Server Backup Configuration script inspired by Windows Server Core's sconfig
# WSB (Windows Server Backup)
###############################################################################
#### Script Prerequisites #####################################################
###############################################################################
using namespace Microsoft.Windows.ServerBackup.Commands
Import-Module ServerManager