tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 3ab8a5d7c60d269ecf286ec9799df0472f0934d5
parent 9a3718b662be1d205dde446cad15ff17632f4aaf
Author: rbckman <robinbackman@gmail.com>
Date:   Wed,  1 Nov 2017 15:03:40 +0000

install script should work now

Diffstat:
Minstall.sh | 74++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
Mtarina.py | 0
2 files changed, 52 insertions(+), 22 deletions(-)

diff --git a/install.sh b/install.sh @@ -9,19 +9,17 @@ fi echo "Installing all dependencies..." apt-get update apt-get upgrade -y -apt-get -y install git python-picamera python-imaging python-pexpect libav-tools gpac omxplayer sox cpufrequtils usbmount python-dbus -git clone https://github.com/willprice/python-omxplayer-wrapper.git -echo "setting up python-omxplayer-wrapper..." -cd python-omxplayer-wrapper -python setup.py install -cd .. +apt-get -y install git python-picamera python-imaging python-pexpect libav-tools mediainfo gpac omxplayer sox cpufrequtils usbmount python-dbus +rpi-update +echo "installing python-omxplayer-wrapper..." +pip install omxplayer-wrapper echo "changing cpu governor to performance..." -cat >> /etc/default/cpufrequtils << EOF +cat <<'EOF' >> /etc/default/cpufrequtils GOVERNOR="performance" EOF echo "Installing rpi hd tft screen..." cp rpihdtft/dt-blob.bin /boot/ -cat >> /boot/config.txt << EOF +cat <<'EOF' >> /boot/config.txt #Rpi-hd-tft framebuffer_width=800 framebuffer_height=480 @@ -35,24 +33,55 @@ dpi_mode=87 hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6 display_rotate=3 dtoverlay=vga666 -dtoverlay=pi3-disable-bt-overlay +#dtoverlay=pi3-disable-bt-overlay dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23framebuffer_height=480 EOF while true; do - read -p "Do you have a USB sound card? Make it default (y)es or (n)o?" yn + read -p "do you have a usb sound card? make it default (y)es or (n)o?" yn case $yn in - [Yy]* ) echo "writing to /etc/modprobe.d/alsa-base.conf"; -cat >> /etc/modprobe.d/alsa-base.conf << EOF + [yy]* ) echo "writing to /etc/modprobe.d/alsa-base.conf"; +cat <<'eof' >> /etc/modprobe.d/alsa-base.conf #set index value options snd_usb_audio index=0 options snd_bcm2835 index=1 - #reorder options snd slots=snd_usb_audio, snd_bcm2835 -EOF +eof break;; - [Nn]* ) exit;; + [nn]* ) break;; + * ) echo "please answer yes or no.";; + esac +done + +while true; do + read -p "do you wish to autostart tarina (y)es or (n)o?" yn + case $yn in + [yy]* ) echo "creating a tarina.service file" +echo <<'EOF' >> /etc/systemd/system/tarina.service +[Unit] +Description=tarina +DefaultDependencies=false + +[Service] +Type=simple +ExecStart=/usr/bin/screen /usr/bin/python /home/pi/tarina/tarina.py +User=root +WorkingDirectory=/home/pi/tarina +Restart=on-failure +StandardInput=tty +TTYPath=/dev/tty5 +TTYReset=yes +TTYVHangup=yes + +[Install] +WantedBy=local-fs.target +EOF +chmod +x /home/pi/tarina/tarina.py +systemctl enable tarina.service +systemctl daemon-reload + break;; + [Nn]* ) echo "Congrats everything done! reboot and run sudo tarina.py";break;; * ) echo "Please answer yes or no.";; esac done @@ -60,17 +89,18 @@ done while true; do read -p "Do you wish to add Robs special hacking tools & configurations (y)es or (n)o?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) echo "Congrats everything done! reboot and run sudo tarina.py";exit;; + [Yy]* ) echo "Configuring Robs special l33t configurations" +apt-get -y install vim htop screen +cp extras/.vimrc /root/.vimrc +cp extras/.vimrc /home/pi/.vimrc + break;; + [Nn]* ) echo "Congrats everything done! reboot and run sudo tarina.py";break;; * ) echo "Please answer yes or no.";; esac done -echo "Configuring Robs special l33t configurations" -apt-get -y install vim htop screen mediainfo -cp extras/.vimrc /root/.vimrc -cp extras/.vimrc /home/pi/.vimrc -echo "Congratz everything done! reboot and run sudo tarina.py" + + diff --git a/tarina.py b/tarina.py