Skip to content

Instantly share code, notes, and snippets.

@skunkie
skunkie / rename_vm.sh
Created December 19, 2014 13:26
Shell script to rename a virtual machine in VMware ESXi
#!/bin/sh
# shell script to rename a virtual machine in ESXi
VOLNAME=$1
DIRNAME=$2
OLDNAME=$3
NEWNAME=$4
VM_DIRPATH="/vmfs/volumes/$VOLNAME/$DIRNAME"
f_OK() {
@skunkie
skunkie / fileinfo.vbs
Last active November 26, 2015 17:11
VBS script for Check_MK check fileinfo
Option Explicit
Dim config, configFile, f, ffilename, filename, fmtime, fso, mtime, tzo, N, Y, M, D
Set fso = CreateObject("Scripting.FileSystemObject")
configFile = fso.GetParentFolderName(fso.GetParentFolderName(Wscript.ScriptFullName)) & "\fileinfo.cfg"
If NOT fso.FileExists(configFile) Then
WScript.Quit
End If
@skunkie
skunkie / reposync.sh
Last active December 3, 2017 00:12
This bash script synchronizes local repositories with external repositories, RPM, reposync, createrepo
#!/bin/bash
# requires bash version 4
# This script synchronizes local repositories with
# external repositories
#
############################################################
# PREREQUISITES
############################################################
for util in reposync createrepo; do