Updated /etc/network/interfaces
This commit is contained in:
parent
9726e537cb
commit
1a5fe1fc4d
14
clone/clone
14
clone/clone
|
@ -249,11 +249,7 @@ step7(){
|
|||
sudo cp ./utility/sats-boot.service /mnt/lib/systemd/system/sats-boot.service;
|
||||
|
||||
echo " (.) Create sats-boot script";
|
||||
if [ $LOCK_PI -eq 1 ]; then
|
||||
sudo cp ./utility/sats-boot /mnt/home/pi/sats-boot;
|
||||
else
|
||||
sudo cp ./utility/sats-boot_withoutlock /mnt/home/pi/sats-boot;
|
||||
fi;
|
||||
sudo cp ./utility/sats-boot /mnt/home/pi/sats-boot;
|
||||
sudo chown 1000:1000 /mnt/home/pi/sats-boot;
|
||||
sudo chmod 770 /mnt/home/pi/sats-boot;
|
||||
|
||||
|
@ -278,8 +274,16 @@ step7(){
|
|||
step8(){
|
||||
echo -e "\n>>> [8] Set up WiFi configuration";
|
||||
|
||||
|
||||
# (1) Update interfaces configuration #
|
||||
echo " (.) Update /etc/network/interfaces configuration";
|
||||
cat ./utility/interfaces | sudo tee /mnt/etc/network/interfaces > /dev/null;
|
||||
|
||||
# (2) Set up wifi credentials #
|
||||
echo " (.) Set up WiFi credentials";
|
||||
echo -e "network={\n\tssid=\"$WIFI_SSID\"\n\tpsk=\"$WIFI_PASS\"\n}" | sudo tee -a /mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null;
|
||||
|
||||
|
||||
echo "<<< done";
|
||||
|
||||
step9;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# interfaces(5) file used by ifup(8) and ifdown(8)
|
||||
|
||||
# Please note that this file is written to be used with dhcpcd
|
||||
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
|
||||
|
||||
# Include files from /etc/network/interfaces.d:
|
||||
source-directory /etc/network/interfaces.d
|
||||
|
||||
# local loop
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# ethernet network interface
|
||||
iface eth0 inet manual
|
||||
|
||||
# wifi network interface #1
|
||||
allow-hotplug wlan0
|
||||
iface wlan0 inet manual
|
||||
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
up /bin/sh /home/sats/satsd/sats-loop update;
|
|
@ -12,4 +12,4 @@ echo "$RANDOM_PASS\n$RANDOM_PASS\n" | sudo passwd pi;
|
|||
sudo systemctl start ssh;
|
||||
|
||||
# [4] Try to install necessary packages
|
||||
sudo apt-get -y install git php5 php5-cli;
|
||||
sudo apt-get -y install git php5 php5-cli php-curl;
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# [1] Set random passwords for 'sats'
|
||||
RANDOM_PASS=$(tr -cd A-Za-z0-9_ < /dev/urandom | head -c 256);
|
||||
echo "$RANDOM_PASS\n$RANDOM_PASS\n" | sudo passwd sats;
|
||||
|
||||
# [2] Set random passwords for 'pi' itself
|
||||
#RANDOM_PASS=$(tr -cd A-Za-z0-9_ < /dev/urandom | head -c 256);
|
||||
#echo "$RANDOM_PASS\n$RANDOM_PASS\n" | sudo passwd pi;
|
||||
|
||||
# [3] Start ssh service
|
||||
sudo systemctl start ssh;
|
||||
|
||||
# [4] Try to install necessary packages
|
||||
sudo apt-get -y install git;
|
|
@ -9,7 +9,7 @@ sh /home/sats/satsd/install-source;
|
|||
# [2] Propagate script
|
||||
if [ "$1" = "daemon" ]; then
|
||||
|
||||
sh /home/sats/satsd/source/daemon $* 2>> /home/sats/satsd/log/daemon.log >> /home/sats/satsd/log/daemon.log;
|
||||
sh /home/sats/satsd/source/daemon 2>> /home/sats/satsd/log/daemon.log >> /home/sats/satsd/log/daemon.log;
|
||||
|
||||
elif [ "$1" = "update" ]; then
|
||||
|
||||
|
|
Loading…
Reference in New Issue