Skip to content

Instantly share code, notes, and snippets.

@Magicalex Magicalex/seedbox.sh
Last active Aug 29, 2015

Embed
What would you like to do?
seedbox.sh
#!/usr/bin/env bash
#
# Nom du script .. : rtorrent-mail.sh
# Version ........ : 0.1
# Date ........... : 30/03/2015
# Auteur ......... : magicalex
# Description .... : script d'installation de rutorrent
#
version="0.1"
echo_color() {
## init les var color
color_init="\033["
color_end="${color_init}0m"
color_red="${color_init}1;31m"
color_green="${color_init}1;32m"
color_yellow="${color_init}1;33m"
color_blue="${color_init}1;34m"
#color text
blue="${color_blue}$2${color_end}"
red="${color_red}$2${color_end}"
yellow="${color_yellow}$2${color_end}"
green="${color_green}$2${color_end}"
if [ $1 = "blue" ]; then
echo -e "${blue}"
elif [ $1 = "red" ]; then
echo -e "${red}"
elif [ $1 = "green" ]; then
echo -e "${green}"
elif [ $1 = "yellow" ]; then
echo -e "${yellow}"
fi
}
check_packger() {
## check apt-get or aptitude
echo "plop"
}
install_base() {
echo "#dépôt paquet propriétaire
deb http://ftp2.fr.debian.org/debian/ wheezy main non-free
deb-src http://ftp2.fr.debian.org/debian/ wheezy main non-free" >> /etc/apt/sources.list.d/non-free.list
echo "# dépôt dotdeb
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list.d/dotdeb.list
echo "# dépôt dotdeb php 5.6
deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb-php56.list
cd /tmp
wget http://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
# etc ...
}
case "$1" in
"-a" | "--add-user")
echo "adding user..."
;;
"-d" | "--delete-user")
echo "deleting user..."
;;
"-p" | "--passwd")
echo "changing password..."
;;
"--plugin")
echo_color blue "Installation du plugin : $2"
;;
"-i" | "--install")
echo "install.."
;;
"-v" | "--version")
echo_color green "installator.sh version : ${version}"
;;
* | "-h" | "--help")
echo_color yellow "Usage : $0"
echo_color yellow "Liste des commandes : "
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.