-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpicons_setup.sh
More file actions
executable file
·30 lines (27 loc) · 1006 Bytes
/
picons_setup.sh
File metadata and controls
executable file
·30 lines (27 loc) · 1006 Bytes
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
#!/bin/bash
# Pi-Cons Setup procedures.
usr=$(env | grep SUDO_USER | cut -d= -f 2)
if [ -z $usr ] && [ $USER = "root" ]
then
echo "The script needs to run as root" && exit 1
fi
apt-get -y update
apt-get -y upgrade
// apt-get install build-essential python-dev python-smbus git php-cli rng-tools chromium-browser -y
apt-get install build-essential php-cli rng-tools chromium-browser -y
// pip install mcp3008
// pip install dicttoxml
cd /home/pi
chmod -R +x /home/pi/PiCons
cd /home/pi/.config/
mkdir autostart
cp /home/pi/PiCons/autoChromium.desktop /home/pi/.config/autostart/autoChromium.desktop
echo "@reboot php -S localhost:80 -t /home/pi/PiCons/ 2>&1 &" > cron.res
#echo "@reboot php -S localhost:8181 -t /home/pi/PiCons/StartPageWebroot/ 2>&1 &" >> cron.res
#echo "@reboot bash /home/pi/PiCons/picons_autostart.sh" >> cron.res
#echo "* * * * * php /home/pi/PiCons/watchDog.php" >> cron.res
crontab cron.res
rm cron.res
echo "You should restart the system."
echo "Type: sudo reboot"
reboot