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 -x | |
IP="10.29.33.14" | |
USER="admin" | |
PASSWORD="admin" | |
DESTINATION="./log_directory/" | |
WGET="wget --no-proxy --user=$USER --password=$PASSWORD --no-check-certificate" | |
cat > /tmp/hpoa.xml << EOF | |
<?xml version="1.0"?> |
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
:: Tested on Windows 7 | |
echo on | |
rem for /f "tokens=3" %%i in ('netsh interface ip show addresses "Local Area Connection" ^|findstr IP.Address') do set IP=%%i | |
rem for /f "tokens=2 delims=. " %%j in ('nslookup %IP% ^|find "Name:"') do set HOSTNAME=%%j | |
@echo. | |
@echo Enable Administrator |
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
:: Tested on Windows 7 | |
@echo. | |
@echo Test connection settings | |
powershell -command "$client = new-object System.Net.WebClient; $client.DownloadFile('http://www.google.com', 'c:\del')" | |
if %ERRORLEVEL% NEQ 0 ( | |
@echo Can not download files form Internet !!! | |
pause | |
exit |
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 -x | |
URL="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-65.iso" | |
ISO=`basename $URL` | |
sudo rm autostart.iso | |
wget --continue $URL | |
sudo mount -o loop ./$ISO /mnt/iso |
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
yum install -y nfs-utils rpcbind | |
chkconfig nfs on | |
mkdir -p /data/hp/ | |
chown -R nfsnobody:nfsnobody /data | |
cat > /etc/exports << EOF | |
/data 0.0.0.0/0.0.0.0(ro,no_root_squash,no_subtree_check,async,crossmnt,fsid=0) | |
/data/hp/ss-scripting-toolkit-linux 0.0.0.0/0.0.0.0(rw,no_root_squash,no_subtree_check,async,crossmnt) |
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
# Install EPEL | |
MAJOR_RELEASE=`sed 's/.* \([0-9]*\)\.[0-9] .*/\1/' /etc/redhat-release` | |
cd /tmp/ | |
lftp -e "mget /pub/linux/fedora/epel/6/x86_64/epel-release*.noarch.rpm; quit;" http://ftp.fi.muni.cz/ | |
rpm -Uvh ./epel*${MAJOR_RELEASE}*.noarch.rpm | |
# Install Cobbler | |
yum install -y cobbler-web fence-agents git hardlink ipmitool dhcp | |
sed -i.orig 's/module = authn_denyall/module = authn_configfile/' /etc/cobbler/modules.conf |
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
# Install EPEL | |
MAJOR_RELEASE=`sed 's/.* \([0-9]*\)\.[0-9] .*/\1/' /etc/redhat-release` | |
cd /tmp/ | |
lftp -e "mget /pub/linux/fedora/epel/6/x86_64/epel-release*.noarch.rpm; quit;" http://ftp.fi.muni.cz/ | |
rpm -Uvh ./epel*${MAJOR_RELEASE}*.noarch.rpm | |
# Install Cobbler | |
yum install -y cobbler-web fence-agents git hardlink ipmitool dhcp | |
sed -i.orig 's/module = authn_denyall/module = authn_configfile/' /etc/cobbler/modules.conf |
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
yum install -y nfs-utils rpcbind | |
chkconfig nfs on | |
mkdir -p /data/hp/HP_Service_Pack_for_Proliant | |
chown -R nfsnobody:nfsnobody /data | |
cat > /etc/exports << EOF | |
/data 0.0.0.0/0.0.0.0(ro,no_root_squash,no_subtree_check,async,crossmnt,fsid=0) | |
EOF |
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
uci set ddns.myddns.enabled=1 | |
uci set ddns.myddns.service_name=duckdns.org | |
uci set ddns.myddns.domain=gate | |
uci set ddns.myddns.username=NA | |
uci set ddns.myddns.password=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | |
uci set ddns.myddns.ip_source=network | |
uci set ddns.myddns.ip_network=wan | |
uci set ddns.myddns.force_interval=72 | |
uci set ddns.myddns.force_unit=hours | |
uci set ddns.myddns.check_interval=10 |
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
opkg install collectd-mod-conntrack collectd-mod-cpu collectd-mod-df collectd-mod-disk collectd-mod-dns collectd-mod-irq collectd-mod-memory collectd-mod-ping collectd-mod-processes collectd-mod-syslog collectd-mod-tcpconns collectd-mod-uptime | |
mkdir -p /etc/collectd/conf.d | |
#Make the stats permanent | |
uci set luci_statistics.collectd_rrdtool.DataDir=/etc/collectd | |
uci set luci_statistics.collectd_ping.enable=1 | |
uci set luci_statistics.collectd_ping.Hosts=www.google.com | |
uci set luci_statistics.collectd_df.enable=1 | |
uci set luci_statistics.collectd_df.Devices=/dev/mmcblk0p1 | |
uci set luci_statistics.collectd_df.MountPoints=/data |
OlderNewer