From 20a3b5775d0c27fe5ee56f7ef303f432b183d3f0 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 29 Nov 2024 15:06:00 -0600 Subject: adding wipedisk; init just now provides ssh login --- init | 106 +++++++++++++++---------------------------------------------------- 1 file changed, 24 insertions(+), 82 deletions(-) (limited to 'init') diff --git a/init b/init index 3c03437..2502e13 100755 --- a/init +++ b/init @@ -10,86 +10,28 @@ # the workstation occur in other scripts, called by this script. # Run as root after booting the live cd and issuing the following command: -# curl -s https://cjennings.net/archsetup/init | bash -i - -welcome () { - clear - echo "" - echo "ArchSetup" - echo "---------" - echo "" - echo "" -} - -check_root_or_exit () { - if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit - fi -} - -setup_ssh () { - # retrieve keys from repo and decrypt - echo "retrieving keys for decryption..." - { - mkdir -p "$HOME/.ssh/" - # retrieve keys from dotfiles repo and decrypt the keys - (git clone --depth 1 https://git.cjennings.net/dotfiles.git \ - "$HOME/dotfiles/") >> /dev/null - cp "$HOME/dotfiles/system/.ssh/*" "$HOME/.ssh/" - rm -rf "$HOME/dotfiles/" - } > /dev/null - cd "$HOME/.ssh/" - gpg --decrypt "$HOME/ssh.tar.gz.gpg" | tar -zxf - - - # set proper permissions on .ssh directory - cd "$HOME" && chmod 600 $HOME/.ssh/* && chmod 700 $HOME/.ssh \ - && chmod 644 $HOME/.ssh/*.pub - - # setup ssh - echo "setting up ssh daemon..." - systemctl start sshd - echo "root:welcome" | chpasswd - hostname=$(