-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_port.sh
40 lines (37 loc) · 800 Bytes
/
update_port.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
34
35
36
37
38
39
40
#!/bin/bash
# Linux Bash File & Messenger App (c) J~Net 2021
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1729-jnet-multi-tool-2021#2677
# https://jnet.forumotion.com/t1744-secure-chat-bash-app#2702
#
if [ -s config/port.txt ];
then
current_port=`cat config/port.txt`
default_port="776"
else
default_port="776"
current_port="776"
fi
#
default_port="776"
echo "Update Port"
echo ""
echo "Currently $current_port delete $current_port then put in Port, Press Enter."
if [ "$#" -eq "0" ]
then
read -e -p "Enter Port " -i "$default_port" port
else
ip=$1
fi
#
echo "Happy With $port?"
read -r -p "[y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "$port" > config/port.txt
cat config/port.txt
else
echo "Ok Then..."
fi
bash menu.sh