-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_host.sh
33 lines (30 loc) · 773 Bytes
/
update_host.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Linux Bash File & Messenger App (c) J~Net 2021
# jnet.sytes.net
#
# ./setup.sh
#
# https://jnet.forumotion.com/t1729-jnet-multi-tool-2021#2677
# https://jnet.forumotion.com/t1744-secure-chat-bash-app#2702
#
defaultip=`cat config/remote_host.txt`
echo "Update Remote Host IP (Appends to the list) Used For Multiple Hosts!"
echo "Currently $defaultip delete $defaultip then put in IP, Press Enter."
if [ "$#" -eq "0" ]
then
read -e -p "Enter Remote IP " -i "$defaultip" ip
else
ip=$1
fi
#
echo "Happy With $ip?"
read -r -p "[y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "$ip" >> config/remote_host.txt
echo "Add New Remote Remote IP"
cat config/remote_host.txt
else
echo "Ok Then..."
fi
bash menu.sh