forked from HawksRepos/PTS-Team
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrDoobPG
authored and
MrDoobPG
committed
Nov 27, 2019
1 parent
77fcd84
commit 66c21aa
Showing
4 changed files
with
61 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# Title: PTS ServerID | ||
# org. Author(s): Admin9705 - Deiteq | ||
# Mod from MrDoob for PTS | ||
# GNU: General Public License v3.0 | ||
################################################################################ | ||
touch /var/plexguide/server.id.stored | ||
start=$(cat /var/plexguide/server.id) | ||
stored=$(cat /var/plexguide/server.id.stored) | ||
source /opt/plexguide/menu/functions/functions.sh | ||
abc="/var/plexguide" | ||
|
||
serverid() { | ||
if [ "$start" != "$stored" ]; then | ||
|
||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
↘️ Establishing Server ID 💬 Use One Word & Keep it Simple | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
EOF | ||
read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty | ||
|
||
if [ "$typed" == "" ]; then | ||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
⛔️ WARNING! - The Server ID Cannot Be Blank! | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
EOF | ||
sleep 1 | ||
serverid | ||
else | ||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
✅️ PASS: Server ID $typed Established | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
EOF | ||
echo "$typed" >${abc}/server.id | ||
cat ${abc}/server.id >${abc}/server.id.stored | ||
sleep 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# Title: PGBlitz (Reference Title File) | ||
# Author(s): Admin9705 - Deiteq | ||
# URL: https://pgblitz.com - http://github.pgblitz.com | ||
# Title: PTS ServerID | ||
# org. Author(s): Admin9705 - Deiteq | ||
# Mod from MrDoob for PTS | ||
# GNU: General Public License v3.0 | ||
################################################################################ | ||
touch /var/plexguide/server.id.stored | ||
start=$(cat /var/plexguide/server.id) | ||
stored=$(cat /var/plexguide/server.id.stored) | ||
source /opt/plexguide/menu/functions/functions.sh | ||
abc="/var/plexguide" | ||
|
||
serverid() { | ||
if [ "$start" != "$stored" ]; then | ||
|
||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
↘️ ESTABLISHING ~ Server's Identification | ||
↘️ Establishing Server ID 💬 Use One Word & Keep it Simple | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
⚠️ WARNING: Use > One Word - All LowerCase & Keep it Simple! | ||
EOF | ||
|
||
# Standby | ||
read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty | ||
|
||
if [ "$typed" == "" ]; then | ||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
⛔️ WARNING! - The Server ID Cannot Be Blank! | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
EOF | ||
sleep 3 | ||
bash /opt/plexguide/menu/interface/serverid.sh | ||
exit | ||
sleep 1 | ||
serverid | ||
else | ||
tee <<-EOF | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
✅️ PASS: ServerID Set | ||
✅️ PASS: Server ID $typed Established | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
EOF | ||
|
||
# Prevents From Repeating | ||
echo "$typed" >/var/plexguide/server.id | ||
cat /var/plexguide/server.id >/var/plexguide/server.id.stored | ||
|
||
sleep 3 | ||
echo "$typed" >${abc}/server.id | ||
cat ${abc}/server.id >${abc}/server.id.stored | ||
sleep 1 | ||
fi | ||
|
||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters