#! /usr/bin/bash # Chris' Server Postinstall Script # Tested with Debian 12 # To run: wget https://www.chillteq.com/public/postinstall && chmod +x postinstall && ./postinstall apt update apt upgrade -y apt install -y samba cifs-utils vim tmux mkdir /storage if grep //192.168.0. /etc/fstab; then echo "found existing fstab entry" else echo "//192.168.0.199/storage /storage cifs rw,iocharset=utf8,username=chris,password= 0 0" >> /etc/fstab fi (crontab -l 2>/dev/null; echo "@reboot sleep 5 && mount -a") | crontab - cd ~/ wget https://chillteq.com/public/bashrc20231212 -O .bashrc wget https://chillteq.com/public/bash_aliases20240308 -O .bash_aliases wget https://chillteq.com/public/tmux.conf_20240221_linuxfix -O .tmux.conf wget https://chillteq.com/public/vimrc -O /etc/vim/vimrc echo "*** Installation complete! Follow configuration instructions to continue." echo "Please run vim /etc/fstab and set real password for samba, then restart the server"