Upload files to "/"
This commit is contained in:
40
whit_install.sh
Normal file
40
whit_install.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#install requirements
|
||||
sudo apt update -y
|
||||
sudo apt upgrade -y
|
||||
sudo apt install kodi lftp fbi ffmpeg cifs-utils samba apache2 php libapache2-mod-php -y
|
||||
|
||||
current_date=$(date +%Y_%m_%d_%H_%M_%S)
|
||||
|
||||
#Backup modified files
|
||||
cp /home/$USER/.bashrc /home/$USER/.bashrc.$current_date
|
||||
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.$current_date
|
||||
sudo cat /home/$USER/WHIT/install/samba.conf |sudo tee -a /etc/samba/smb.conf
|
||||
sudo cp /home/$USER/WHIT/install/html /var/www/html/whit -r
|
||||
|
||||
sudo sed -i s/'$USER'/"$USER"/g /etc/samba/smb.conf
|
||||
|
||||
#make folder
|
||||
mkdir /home/$USER/WHIT/tv
|
||||
mkdir /home/$USER/WHIT/working
|
||||
sudo mkdir /mnt/whit
|
||||
|
||||
|
||||
#Make Scripts EXECUTABLE
|
||||
chmod +x /home/$USER/WHIT/config/autostart.sh
|
||||
chmod +x /home/$USER/WHIT/config/wifi.sh
|
||||
|
||||
#config after boot
|
||||
sudo touch /boot/1st_boot
|
||||
|
||||
#Midnight reboot
|
||||
echo " * * * root /sbin/reboot" | sudo tee /etc/cron.d/020_whit
|
||||
|
||||
#Activate shortcuts in .bashrc
|
||||
sed -i "s/#alias ll='ls -l'/alias ll='ls -l'/g" /home/$USER/.bashrc
|
||||
sed -i "s/#alias ll='ls -A'/alias la='ls -A'/g" /home/$USER/.bashrc
|
||||
sed -i "s/#alias l='ls -CF'/alias ll='ls -CFl'/g" /home/$USER/.bashrc
|
||||
|
||||
|
||||
#add configure and run to .bashrc
|
||||
cat ./install/bashrcinfo >> /home/$USER/.bashrc
|
||||
Reference in New Issue
Block a user