Added debug option (not to lock pi user)

This commit is contained in:
xdrm-brackets 2017-01-25 20:59:33 +01:00
parent 55924e9434
commit e022c6d9ce
3 changed files with 23 additions and 1 deletions

View File

@ -243,7 +243,11 @@ step7(){
sudo cp ./utility/sats-boot.service /mnt/lib/systemd/system/sats-boot.service; sudo cp ./utility/sats-boot.service /mnt/lib/systemd/system/sats-boot.service;
echo " (.) Create sats-boot script"; echo " (.) Create sats-boot script";
if [ $LOCK_PI -eq 1 ]; then
sudo cp ./utility/sats-boot /mnt/home/pi/sats-boot; sudo cp ./utility/sats-boot /mnt/home/pi/sats-boot;
else
sudo cp ./utility/sats-boot_withoutlock /mnt/home/pi/sats-boot;
fi;
sudo chown 1000:1000 /mnt/home/pi/sats-boot; sudo chown 1000:1000 /mnt/home/pi/sats-boot;
sudo chmod 770 /mnt/home/pi/sats-boot; sudo chmod 770 /mnt/home/pi/sats-boot;

View File

@ -7,3 +7,6 @@ export WIFI_PASS=" manon adrien ";
# SERVER SETTINGS # SERVER SETTINGS
export SERVER_HOSTNAME="xdrm.io"; export SERVER_HOSTNAME="xdrm.io";
export SERVER_USERNAME="satsd"; export SERVER_USERNAME="satsd";
# DEBUG SETTINGS
export LOCK_PI=0;

View File

@ -0,0 +1,15 @@
#!/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 install git;