Upload files to "install"
This commit is contained in:
31
install/bashrcinfo
Normal file
31
install/bashrcinfo
Normal file
@@ -0,0 +1,31 @@
|
||||
#START OF WHIT EDIT
|
||||
|
||||
updatemacfile=/boot/1st_boot
|
||||
if [[ -f "$updatemacfile" ]]; then
|
||||
mac=$(cat /sys/class/net/eth0/address \| sed s/://g \| cut -c7-)
|
||||
sudo hostname whit$mac
|
||||
echo whit$mac \| sudo tee /etc/hostname
|
||||
echo 127.0.0.1 localhost \| sudo tee /etc/hosts
|
||||
echo ::1 localhost ip6-localhost ip6-loopback \| 'sudo tee -a /etc/hosts
|
||||
echo ff02::1 ip6-allnodes \| sudo tee -a /etc/hosts
|
||||
echo ff02::2 ip6-allrouters \| sudo tee -a /etc/hosts
|
||||
echo \| sudo tee -a /etc/hosts
|
||||
echo 127.0.1.1 whit$mac \| sudo tee -a /etc/hosts
|
||||
sed -i "s/USER=whit/USER=whit$mac/g" '/home/$USER/config/autostart.sh
|
||||
sed -i "s/PASS=whit/PASS=whit$mac/g" /home/$USER/config/autostart.sh
|
||||
sed -i "s/export updatehost=whit1/export updatehost=whit$mac/g"
|
||||
/home/$USER/config/autostart.sh
|
||||
sudo mv /boot/1st_boot /boot/2nd_boot
|
||||
#sudo mv /boot/autostart.sh /home/$USER/WHIT/config/
|
||||
sudo chown pi /home/$USER/WHIT/config/autostart.sh
|
||||
sudo chgrp pi /home/$USER/WHIT/config/autostart.sh
|
||||
sudo chmod 777 /home/$USER/WHIT/config/autostart.sh
|
||||
sudo reboot
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$(tty)" == "/dev/tty1" ]] ; then
|
||||
/home/$USER/WHIT/config/autostart.sh
|
||||
fi
|
||||
|
||||
#END OF WHIT EDIT
|
||||
23
install/samba.conf
Normal file
23
install/samba.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
[config]
|
||||
comment = config share
|
||||
path = /home/$USER/WHIT
|
||||
browerable = no
|
||||
writeable = yes
|
||||
read only = no
|
||||
creat mask = 0777
|
||||
directory mask = 0777
|
||||
public = no
|
||||
guest ok = no
|
||||
|
||||
[www]
|
||||
comment = tv
|
||||
path = /var/www/html
|
||||
browerable = yes
|
||||
writeable = yes
|
||||
read only = no
|
||||
creat mask = 0777
|
||||
directory mask = 0777
|
||||
public = yes
|
||||
guest ok = yes
|
||||
|
||||
Reference in New Issue
Block a user