Adafruit-WebIDE/scripts/change-hostname.sh
2012-10-16 12:20:43 -05:00

7 lines
No EOL
185 B
Bash
Executable file

#!/usr/bin/env bash
sudo echo "127.0.1.1 $1" >> /etc/hosts
sudo echo "$1" > /etc/hostname
sudo hostname -F /etc/hostname
sudo /etc/init.d/hostname.sh start
service avahi-daemon restart