-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·46 lines (34 loc) · 1.3 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
#enable i2c
sudo raspi-config nonint do_i2c 0
echo 'SUBSYSTEM=="i2c-dev", TAG+="systemd"' > /etc/udev/rules.d/99-i2c.rules
#install general apps
sudo apt-get install apache2 php7.0 libapache2-mod-php mplayer git
#install gh
GITHUB_CLI_VERSION=$(curl -s "https://api.github.com/repos/cli/cli/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
curl -Lo gh.deb "https://github.com/cli/cli/releases/latest/download/gh_${GITHUB_CLI_VERSION}_linux_armv6.deb"
sudo dpkg -i gh.deb
# install Pimoroni touchhat stuff
curl https://get.pimoroni.com/touchphat | bash
# install Adafruit LED
git clone https://github.com/adafruit/Adafruit_Python_LED_Backpack.git
cd Adafruit_Python_LED_Backpack/
sudo python setup.py install
# install bluetooth audio
sudo apt install pulseaudio-module-bluetooth
# copy apache config
sudo cp 000-default.conf /etc/apache2/sites-enabled/
sudo chmod -R 777 www
sudo a2enmod rewrite
# setup services
sudo cp buttons.service /etc/systemd/system/
sudo systemctl enable buttons.service
sudo systemctl start buttons
sudo cp alarms.service /etc/systemd/system/
sudo systemctl enable alarms.service
sudo systemctl start alarms
sudo cp piclock.service /etc/systemd/system/
sudo systemctl enable piclock.service
sudo systemctl start piclock
sudo systemctl daemon-reload
echo '### reboot if ready'