SETUP SCRIPT: Ubuntu 16.04.2 LTS TVheadend dvb 4l drivers and wscan

Added by Kevern Upton 2 months ago

###################################################
#######     Compliments iIot online store   #######
#######     www.iiot.co.za                  #######
###################################################
#######        Ubuntu 16.04.2 LTS           #######
#######        Assorted v41 drivers         #######
#######        Tvheadend Package Stable     #######
#######        Tested - MyGica T230C DVB    #######
#######   By Kevern Upton  -  17 June 2017  #######
###################################################
#######   Use killall -9 tvheadend then     #######
#######   sudo w_scan -x to generate        #######  
#######   channels list                     #######
#######   Copy and paste this into a shell  #######
#######   to execute                        #######
###################################################
######    Use entirely at own risk          #######
###################################################
update_dependancies(){
sudo apt-get update
sudo apt-get install git -y
}
install_dvb_drivers(){
sudo mkdir -p /opt/crazycat && cd /opt/crazycat
sudo apt-get install  make gcc patchutils libproc-processtable-perl -y
sudo git clone https://bitbucket.org/CrazyCat/media_build
cd media_build
sudo ./build --main-git
sudo make install
}
install_w_scan(){
sudo mkdir -p /opt/wscan && cd /opt/wscan
sudo wget http://wirbel.htpc-forum.de/w_scan/w_scan-20170107.tar.bz2
sudo tar -xvf w_scan-20170107.tar.bz2
cd w_scan-20170107 && sudo ./configure
sudo make 
sudo make install
cd ~/
}
install_tvheadend(){
sudo apt-add-repository ppa:mamarley/tvheadend-git-stable -y
sudo apt-get update
sudo apt-get install tvheadend -y
}
reboot_server(){
sudo reboot
}
update_dependancies
install_dvb_drivers
install_w_scan
install_tvheadend
reboot_server

Replies (4)

RE: SETUP SCRIPT: Ubuntu 16.04.2 LTS TVheadend dvb 4l drivers and wscan - Added by saen acro 22 days ago

Kevern Upton wrote:

[...]

where is a header of shell script.
No need to run inside script commands with sudo make it global.

RE: SETUP SCRIPT: Ubuntu 16.04.2 LTS TVheadend dvb 4l drivers and wscan - Added by Kevern Upton 22 days ago

Please share, re-write the code for benefit of all folks on this forum then?

RE: SETUP SCRIPT: Ubuntu 16.04.2 LTS TVheadend dvb 4l drivers and wscan - Added by saen acro 22 days ago

at begining

#!/bin/bash

check permissions

if [ "$(id -u)" = "1" ]; then
    echo "" 
    echo "You are trying to run a build as regular user." 
    echo
    echo "Do not do this, user from SUDO group." 
    echo "Aborting the build. Run it as privileged user and retry." 
    echo
    exit 1
fi

apt-get update
can be replaced by
apt update and run once at beginning

can be used

case $1 in
    [1-9]|1[0-9]|2[0-9]|3[0-9]) REPLY=$1;;
        echo "make action:" 
        echo "1) install_dvb_drivers
        echo "2) install_w_scan
        echo "3) install_tvheadend
        echo "4) reboot_server
        read -p "Select target (1-4)? ";;
esac

(1-4/4)