diff --git a/myip.sh b/myip.sh index 94f295c..e17b6e3 100755 --- a/myip.sh +++ b/myip.sh @@ -1,5 +1,7 @@ if [ "$(uname)" = "Darwin" ]; then echo Local IP: $(ifconfig en0 | grep "inet " | awk '{print $2}') +elif [ "$(uname)" = "FreeBSD" ]; then + MYIPLAN='' # hostname -I not work in FreeBSD else echo Local IP: $(echo `hostname -I` | awk '{print $1;}') fi diff --git a/nixhome/.bashrc b/nixhome/.bashrc index 25bf37f..6e9de8e 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -125,11 +125,6 @@ esac # others: # \w shows absolute path, \W shows current folder. -if [ "$(uname)" = "Darwin" ]; then - MYIPLAN=$(ifconfig en0 | grep "inet " | awk '{print $2}') -else - MYIPLAN=$(echo `hostname -I` | awk '{print $1;}') -fi MYIPPUB=$(curl -s ifconfig.me) if [ "$(uname)" = "Darwin" ]; then diff --git a/nixhome/.ssh/authorized_keys b/nixhome/.ssh/authorized_keys index 5a1fc1b..297662b 100644 --- a/nixhome/.ssh/authorized_keys +++ b/nixhome/.ssh/authorized_keys @@ -1 +1,2 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB9nZPBhGH8Fq40bkFsxsH3kd73PG+nR5bQAqwQQKUfw adot@tic.cc \ No newline at end of file +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB9nZPBhGH8Fq40bkFsxsH3kd73PG+nR5bQAqwQQKUfw adot@tic.cc +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII8ma6WKwCD3vg+OKgofH9ZOSYxWAbrk9IKlM8tqjEEM adot@doomship