Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh -e
# Start/Stop rtorrent sous forme de daemon.
NAME=rtorrent-daemon.sh
SCRIPTNAME=/etc/init.d/$NAME
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
case $1 in
start)
echo "Starting rtorrent... "
# Fichier de configuration de rtorrent.
# Par défaut, c'est le fichier ~/.rtorrent.rc
# Limites des taux de téléchargement en réception et en envoi. "0" équivaut à aucune limite.
#download_rate = 500
#upload_rate = 150
# Répertoire qui contient les fichiers téléchargés.
directory = /home/utilisateur/downloads
@Blacksly
Blacksly / scriptinstall.sh
Last active September 28, 2016 21:28
script install
#!/bin/bash
#install
apt-get install aptitude
aptitude -y install nginx vim rtorrent php5 php5-fpm
#config bash et vim
cd /root
rm .bashrc
@Blacksly
Blacksly / vhost
Last active August 29, 2015 14:02
nginx
server
{
root /var/www;
index index.php index.html;
server_name adresse_ip_ou_nom_de_domaine;
access_log /var/log/nginx/test-access_log;
error_log /var/log/nginx/test-error_log;
location /
syntax on
set number
set tabstop=4
set ignorecase
set ruler
set background=dark
set hlsearch
PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
umask 022
export CLICOLOR=1
alias ll='ls -la --color'
alias la='ls -A --color'
alias vi='vim'
alias l='ls -CF'
PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
umask 022
export CLICOLOR=1
alias ll='ls -la --color'
alias la='ls -A --color'
alias vi='vim'
alias l='ls -CF'
aptitude install nginx postgresql-9.3 postgresql-9.3-postgis-2.1 postgresql-client postgresql-common php5-pgsql php5 php5-cli php5-fpm php5-gd php5-curl php5-mcrypt
127.0.0.1 localhost www.kpi.com
server
{
root /var/www/www.kpi.com;
index index.php;
server_name www.kpi.com;
access_log /var/log/nginx/kpi-access_log;
error_log /var/log/nginx/kpi-error_log;
location /