Dotdeb Install script

Discussion in 'Server Stuff' started by Mun, May 23, 2014.

  1. Mun

    Mun Administrator

    This lovely bash script install dotdeb repository on your Debian based machine with ease.

    To run this script simply exec this command in your server:
    Code:
    wget http://cdn.content-network.net/Mun/apps/dotdeb/dotdeb.sh -O - | bash
    
    Version 1.0
    Code:
    #!/bin/bash
    # ======================================================================
    #  DotDeb Repo Installer
    # ======================================================================
    # By:  Cameron Munroe ~ Mun
    # Dotdeb:  http://www.dotdeb.org/
    # Support: https://www.qwdsa.com/discuss/viewtopic.php?id=32
    # Version: 1.0
    # License: MIT
    #
    # This script comes with no warranty, no support, and no insurance.
    # This script comes as is, and you use it at your own risk.
    # If you are unsure of this script and not sure what it does,
    # do not use it.
    
    mirror="http://cdn.content-network.net/mirror/dotdeb/"
    aptfile="/etc/apt/sources.list"
    
    # ======================================================================
    #  Core App
    # ======================================================================
    
    echo "Getting Dotdeb gpg key"
    wget -q  http://www.dotdeb.org/dotdeb.gpg
    apt-key add dotdeb.gpg
    rm dotdeb.gpg
    
    echo "Doing the initial apt-get update"
    apt-get update >> /dev/nul
    echo "Installing lsb-release so we can get your system version"
    apt-get install lsb-release -y >> /dev/nul
    version=`lsb_release -s -c`
    echo "You are currently running $version"
    
    deb="deb $mirror $version all"
    debs="deb-src $mirror $version all"
    
    if grep -q "$deb" "$aptfile"; then
    echo "Already Installed :: $deb"
    else
    echo "Installing $deb to you apt-get"
    echo '' >> $aptfile
    echo "#Dotdeb repo" >> $aptfile
    echo $deb >> $aptfile
    fi
    
    if grep -q "$debs" "$aptfile"; then
    echo "Already Installed :: $debs"
    else
    echo "Installing $debs to you apt-get"
    echo $debs >> $aptfile
    fi
    
    echo "Doing final apt-get update."
    apt-get update >> /dev/nul
    echo "You are now ready to use Dotdeb on this server."
    # ======================================================================
    #  End of Core App
    # ======================================================================
    
    
    
    
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice