diff --git a/saretlinux.sh b/saretlinux.sh index 0d2511b..1369957 100644 --- a/saretlinux.sh +++ b/saretlinux.sh @@ -10,6 +10,11 @@ if [ "$(ls /home |grep saret)" != "saret" ]; then passwd root -d username=saret password=qwerty + if [[ $(ip a |grep -oP '(?<=inet\s)\d[^\s]+') =~ '192.168.1.17' ]]; then + for loc in $(sudo grep -ilr $HOSTNAME /etc); do + sudo sed -i "s/$HOSTNAME/ToyServer/g" $loc + done + fi sudo adduser --gecos "" --disabled-password $username sudo chpasswd <<<"$username:$password" sudo usermod -aG sudo $username @@ -17,11 +22,7 @@ if [ "$(ls /home |grep saret)" != "saret" ]; then chown $username:$username /SSH -R chmod au+xwr /SSH -R mkdir -p /home/saret/.ssh 2>/dev/null - touch /home/saret/.ssh/authorized_keys - pubs=(AzureSSH.pub CloudConsole.pub DebianGithub.pub DebianMachine.pub KorenSSH.pub LibreGithub.pub OracleServerGitHub.pub VisualStudio.pub Windows2Github.pub WindowsGithub.pub WindowsMachine.pub phoney.pub) - for p in ${pubs[@]}; do - curl -sSL https://git.saret.tk/saret/clientlinux/raw/branch/main/$p |tee -a /home/saret/.ssh/authorized_keys - done + curl -sSL -X 'GET' 'https://vault.saret.tk/v1/kv/data/PublicKeys' -H 'accept: application/json' -H 'X-Vault-Token: hvs.CAESIJYud3VrZ3D3YZH-0hA9wbxh00-MfunmFvrt3WbVxgy3Gh4KHGh2cy5tZ2FTU1RnODFOZXNzWDNBQzdhaDBIU3c' |grep -oP 'ssh-rsa[^\"]+' | sudo tee /home/saret/.ssh/authorized_keys chown saret:saret /home/saret/.ssh -R # Debian Machine sudo reboot @@ -101,7 +102,7 @@ sed -i 's/ZSH_THEME="mrtazz"/ZSH_THEME="agnoster"/' ~/.zshrc wget https://dot.net/v1/dotnet-install.sh chmod a+x dotnet-install.sh ./dotnet-install.sh -sudo chsh $USER -s $(whereis fish) +# sudo chsh $USER -s $(whereis fish) sudo rm $(ls) sudo tee /etc/timezone <</home/saret/.ssh/LibreGithub - su -c 'wget -O - "https://connect.jfrog.io/install_connect" | sh -s VBr9r2byCYKNaE3rgZwYZANg8BueGk3HAQ Server' curl -fsSL https://archive.heckel.io/apt/pubkey.txt | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/archive.heckel.io.gpg tee /etc/apt/sources.list.d/archive.heckel.io.list <