diff options
Diffstat (limited to 'init')
| -rwxr-xr-x | init | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1,12 +1,21 @@ #!/bin/sh + +# update and install tmux and git pacman -Sy --noconfirm pacman -S --noconfirm tmux git -systemctl start sshd +# change the root password echo "root:welcome" | chpasswd + +# find the hostname from the file hostname=$(</etc/hostname) -ipaddress=$(ip addr show wlan0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1) +# identify which interface is up, then find the ip address +interface_up=$(ip addr show | grep "state UP" -B2 | head -n1 | awk '{print $2}' | sed 's/://') +ipaddress=$(ip addr show $(interface_up) | grep 'inet ' | awk '{print $2}' | cut -d/ -f1) + +# start the ssh daemon +systemctl start sshd echo ""; echo ""; echo "init complete. " echo "you may ssh root@$hostname or ssh root@$ipaddress using the password 'welcome'" |
