mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-27 09:28:12 +03:00
13 lines
242 B
Bash
Executable File
13 lines
242 B
Bash
Executable File
#!/bin/bash
|
|
|
|
hostname=$(hostname)
|
|
ip=$(hostname -i)
|
|
|
|
cp /etc/hosts ~/hosts
|
|
|
|
sed -i 's/127\.0\.0\.1\s+/127\.0\.0\.1 localhost.localdomain /' ~/hosts
|
|
sed -i "s/${ip}\s+/${ip} ${hostname}.localdomain /" ~/hosts
|
|
|
|
cp ~/hosts /etc/hosts
|
|
rm ~/hosts
|