startup folder fix
This commit is contained in:
@@ -8,22 +8,26 @@ apt install neofetch -y
|
|||||||
echo "neofetch" >> /home/chip/.bashrc
|
echo "neofetch" >> /home/chip/.bashrc
|
||||||
|
|
||||||
wget https://raw.githubusercontent.com/asophila/headless/main/startup.sh
|
wget https://raw.githubusercontent.com/asophila/headless/main/startup.sh
|
||||||
chmod +x startup.sh
|
mv startup.sh /home/chip/
|
||||||
|
chmod +x /home/chip/startup.sh
|
||||||
|
|
||||||
sed -e -i '$i \sh /home/chip/startup.sh\n' /etc/rc.local
|
sed -i '$i \sh /home/chip/startup.sh\n' /etc/rc.local
|
||||||
|
chmod +x /etc/rc.local
|
||||||
|
|
||||||
echo -n "Insert a name for the ntfy.sh group where the network IP will be posted:"
|
echo -n "Insert a name for the ntfy.sh group where the network IP will be posted:"
|
||||||
read group
|
read group
|
||||||
if [$group==""]; then
|
if [[ -z "$group" ]]; then
|
||||||
$group=="secret_ip"
|
$group="secret_ip"
|
||||||
fi
|
fi
|
||||||
sed -i 's/SECRET_GROUP/$group/g' startup.sh
|
sed -i 's/SECRET_GROUP/$group/g' startup.sh
|
||||||
|
|
||||||
echo -n "Insert a name for this host:"
|
echo -n "Insert a name for this host:"
|
||||||
read hname
|
read hname
|
||||||
|
if [[ -z "$hname" ]]; then
|
||||||
|
$hname="chip"
|
||||||
|
fi
|
||||||
|
|
||||||
hostnamectl set-hostname $hname
|
hostnamectl set-hostname $hname
|
||||||
|
|
||||||
|
|
||||||
echo "."
|
echo "."
|
||||||
echo "*** Done ***"
|
echo "*** Done ***"
|
||||||
|
|||||||
Reference in New Issue
Block a user