This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# tcpping: test response times using TCP SYN packets | |
# URL: http://www.vdberg.org/~richard/tcpping.html | |
# | |
# uses tcptraceroute from http://michael.toren.net/code/tcptraceroute/ | |
# | |
# (c) 2002-2005 Richard van den Berg <[email protected]> under the GPL | |
# http://www.gnu.org/copyleft/gpl.html | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Creates a Windows server KVM using LVM. | |
# Use ssh forwarding to access the VNC display to complete the Windows installation, like ssh example.host -L 56681:127.0.0.1:56681 | |
# Once connected with VNC, browse for the viostor driver | |
# | |
# In this example, both network bridges on the host will be available in the Windows VM. | |
# | |
NAME=desktop | |
RAM=4096 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# 10-sysinfo - generate the system information | |
# Copyright (c) 2013 Nick Charlton | |
# | |
# Authors: Nick Charlton <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# 00-header - create the header of the MOTD | |
# Copyright (c) 2013 Nick Charlton | |
# Copyright (c) 2009-2010 Canonical Ltd. | |
# | |
# Authors: Nick Charlton <[email protected]> | |
# Dustin Kirkland <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# 20-updates - create the system updates section of the MOTD | |
# Copyright (c) 2013 Nick Charlton | |
# | |
# Authors: Nick Charlton <[email protected]> | |
# Based upon prior work by Dustin Kirkland and Michael Vogt. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /etc/rc.common | |
CheckForNetwork | |
while [ "${NETWORKUP}" != "-YES-" ] | |
do | |
sleep 1 | |
NETWORKUP= | |
CheckForNetwork | |
done | |
/usr/local/bin/wakeonlan 00:08:9B:C5:BD:21 #<-- Enter NAS MAC address here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# | |
# 1. Install required dependencies: | |
# sudo apt-get install -y libxml-simple-perl pv libsys-virt-perl | |
# 2. Run it like this (assuming the LVM disk size is 20G): | |
# /virt-backup.pl --vm mykvm --state --snapsize=20G --backupdir /tmp --debug --compress | |
# | |
# AUTHOR | |
# Daniel Berteaud <[email protected]> | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
available_governors=$(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors \ | |
| head -1 | sed -e 's/ \([a-zA-Z0-9]\)/|\1/g' -e 's/ $//') | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: $0 [$available_governors]" | |
fi | |
function current_cpu_governor () | |
{ |