Skip to content

Commit d1c1aa9

Browse files
committed
setup & update procedure
1 parent fca6f97 commit d1c1aa9

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

scripts/image/setup.sh

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
#!/usr/bin/env bash
22
sudo passwd pi
3-
sudo apt update
4-
sudo apt upgrade
5-
3+
sudo touch /boot/ssh
64
sudo raspi-config
5+
# enable ssh
6+
77
# hostname: omnipy
88
# wifi: NO, noway, omnipyway
99
# adv, memory split, 16
10-
#sudo reboot
10+
# enable predictive intf names
11+
12+
sudo apt update && sudo apt upgrade -y
1113

1214
sudo apt install -y bluez-tools python3 python3-pip git build-essential libglib2.0-dev vim jq libdbus-1-dev libudev-dev libical-dev libreadline-dev rpi-update expect
1315
#sudo apt install -y hostapd dnsmasq
16+
#sudo systemctl disable hostapd
17+
#sudo systemctl unmask hostapd
18+
#sudo systemctl disable dnsmasq
19+
20+
git config --global user.email "omnipy@balya.net"
21+
git config --global user.name "Omnipy Setup"
22+
git clone https://github.com/winemug/omnipy.git
23+
#switch to dev
24+
git clone https://github.com/winemug/bluepy.git
1425

15-
sudo systemctl disable hostapd
16-
sudo systemctl unmask hostapd
17-
sudo systemctl disable dnsmasq
1826

19-
/bin/rm /boot/.firmware_revision
27+
sudo /bin/rm /boot/.firmware_revision
2028
sudo cp /home/pi/omnipy/scripts/image/rpiupdate.sh /usr/bin/rpiupdate
2129
sudo ROOT_PATH=/ BOOT_PATH=/boot SKIP_DOWNLOAD=0 SKIP_REPODELETE=1 SKIP_BACKUP=1 UPDATE_SELF=0 RPI_REBOOT=1 BRANCH=next rpi-update 502a515156eebbfd3cc199de8f38a975c321f20d
2230

@@ -39,16 +47,9 @@ sudo ln -s /usr/libexec/bluetooth/obexd /usr/lib/bluetooth/obexd
3947

4048
sudo systemctl daemon-reload
4149

42-
43-
git config --global user.email "omnipy@balya.net"
44-
git config --global user.name "Omnipy Setup"
45-
4650
sudo pip3 install simplejson Flask cryptography requests
4751

48-
git clone https://github.com/winemug/omnipy.git
49-
git clone https://github.com/winemug/bluepy.git
50-
51-
cd bluepy
52+
cd /home/pi/bluepy
5253
python3 ./setup.py build
5354
sudo python3 ./setup.py install
5455

@@ -90,6 +91,7 @@ sudo touch /boot/omnipy-pwreset
9091
sudo touch /boot/omnipy-fwupdate
9192

9293
rm /home/pi/.bash_history
94+
#wpa?
9395
sudo halt
9496

9597
######

scripts/pi-update-finalize.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
echo
33
echo Updating service scripts and restarting services
44

5+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hciconfig`
6+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hcitool`
7+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which btmgmt`
8+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which bt-agent`
9+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which bt-network`
10+
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which bt-device`
11+
sudo find /usr/lib -name bluepy-helper -exec setcap 'cap_net_raw,cap_net_admin+eip' {} \;
12+
sudo find /home/pi -name bluepy-helper -exec setcap 'cap_net_raw,cap_net_admin+eip' {} \;
513
sudo chown -R pi.pi /home/pi
614

715
if [[ -f /home/pi/omnipy/scripts/btnap-custom.sh ]]

0 commit comments

Comments
 (0)