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 | |
# Nuke it, baby | |
# | |
# I recommend you fork this script and set your protected slots if you have multiple and wish to make sure there is a specific slot that can't get nuked. | |
# | |
# You can enter your protected servers here so that slots on this server are immune to the script. It is unlikely to have multiple slots per server for a user. | |
protected=("metis") | |
# | |
if [[ "$(hostname)" = "$(echo ${protected[@]} | grep -o $(hostname))" ]] | |
then |
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
wget http://www.musicpd.org/download/mpd/0.19/mpd-0.19.10.tar.xz | |
tar xf mpd-0.19.10.tar.xz && cd mpd-0.19.10/ | |
./configure --prefix=$HOME | |
make && make install | |
cd && rm -rf mpd-0.19.10{.tar.xz,} |
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
git clone https://github.com/dagwieers/dstat.git && cd ~/dstat/ | |
make install prefix=$HOME && cd && rm -rf ~/dstat | |
~/bin/dstat |
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 | |
# Nuke it, baby | |
# | |
if [[ "$(hostname)" = 'metis' ]] | |
then | |
echo | |
echo -e "\033[36m""This is the metis slot, i am exiting""\e[0m" | |
echo | |
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
# wget -qO ~/instances http://git.io/vvkIu | |
# crontab -e | |
# * * * * * bash -l ~/instances | |
####################################################################################################################################### | |
suffix="1" | |
# rtorrent | |
if [[ -z "$(ps x | grep -v grep | grep -o '/bin/bash -e /usr/local/bin/rtorrent -n -o import='"$HOME"'/.rtorrent-'"$suffix"'.rc')" ]] | |
then | |
screen -fa -dmS rtorrent-"$suffix" rtorrent -n -o import=~/.rtorrent-"$suffix".rc | |
echo "$(date +"%d.%m.%y@%H:%M:%S")" rtorrent-"$suffix" >> ~/screenlogs.txt |
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
# wget -qO ~/instances http://git.io/vvkfk | |
# crontab -e | |
# * * * * * bash -l ~/instances | |
####################################################################################################################################### | |
suffix="1" | |
# rtorrent | |
if [[ -z "$(ps x | grep -v grep | grep -o '/bin/bash -e /usr/local/bin/rtorrent -n -o import='"$HOME"'/.rtorrent-'"$suffix"'.rc')" ]] | |
then |
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
# Make the test folder we will work in. | |
mkdir -p ~/mytest && cd ~/mytest | |
# Export the test variables. | |
export testvar1="000 111 222 333 444" && export testvar2="555 666 777 888 999" | |
# create a folder using command or paramter substitution and testvar1 | |
mkdir $(echo $testvar1) && ls |