1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-09-28 06:24:10 +08:00

Regular update: 2020-07-20T18:06:15Z

This commit is contained in:
Septs 2020-07-21 02:06:15 +08:00
parent 8c1b87eaa4
commit af02d7ece0
5 changed files with 55 additions and 62 deletions

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091
set -euo pipefail
IFS=$'\n\t'

View file

@ -34,47 +34,40 @@ BWHITE="${ESC}[47m" #White
#########################
# Error Message that stops the script
errmsg()
{
errmsg() {
echo -en "${BRED}>>${RESET} ${FMAGENTA}${*}${RESET}"
return 1
}
# Normal Message
msg()
{
msg() {
echo -en "${BBLUE}>>${RESET} ${BRIGHT}${FGREEN}${*}${RESET}"
}
# Debug Level Verbose
dbgmsg()
{
dbgmsg() {
echo -en "${BRIGHT}${BBLUE}>>${RESET} ${BRIGHT}${FGREEN}${*}${RESET}"
}
# Verbose Message
vmsg()
{
vmsg() {
echo -en "${BRIGHT}${BBLUE}>>${RESET} ${BRIGHT}${FCYAN}${*}${RESET}"
}
# Formatted Output
# for TUN30
print_tun30()
{
print_tun30() {
printf "${FGREEN}%-20s${RESET}|${FYELLOW}%10s${RESET}| ${FCYAN}%20s ${BRIGHT}${FBLUE}<--> ${FMAGENTA}%s${RESET}\n" \
"$1" "$2" "$3" "$4"
}
print_subnet()
{
print_subnet() {
printf "${FGREEN}%-20s${RESET}${BRIGHT}${FBLUE}|| ${FMAGENTA}%s${RESET}\n\t>> %s\n" \
"$1" "$2" "$3"
}
print_ptp()
{
print_ptp() {
upstream_ip="${1%~*}"
downstream_ip="${1#$upstream_ip}"
downstream_ip="${downstream_ip#*~}"
@ -83,8 +76,7 @@ print_ptp()
"$2" "$upstream_ip" "$downstream_ip" "$3" "$4"
}
print_lo()
{
print_lo() {
printf "${FGREEN}%-20s${RESET}${BRIGHT}${FBLUE}||${FMAGENTA}%24s${RESET} ${BRIGHT}${FBLUE}|| ${RESET}%s\n" \
"$1" "$2" "$3"
}

View file

@ -2,7 +2,7 @@
set -euo pipefail
IFS=$'\n\t'
if [ ! -n "$SSHPRIVKEY" ]; then
if [ -z "$SSHPRIVKEY" ]; then
echo SSHPRIVKEY is not set
exit 1
fi
@ -13,7 +13,7 @@ chmod 0600 "$HOME/.ssh/id_ed25519"
set -x
cd generated || exit -1
cd generated || exit 1
git remote set-url origin git@github.com:NeoCloud/NeoNetwork-ROA.git
git config user.name "NeoCloud ROA bot"