Compare commits

...
This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.

11 Commits

Author SHA1 Message Date
Karol Wypchło 4da5c6c696
Merge branch 'master' into add-shell-scripts-lint 2022-09-20 15:21:10 +02:00
Karol Wypchlo a43cddb334
fix serverload issues 2022-09-13 13:36:23 +02:00
Karol Wypchło 519a940c75
Merge branch 'master' into add-shell-scripts-lint 2022-09-13 13:36:04 +02:00
Karol Wypchło 5e5241d45f
Merge branch 'master' into add-shell-scripts-lint 2022-09-09 10:46:15 +02:00
Karol Wypchło ee9840ec74
Merge branch 'master' into add-shell-scripts-lint 2022-06-20 14:25:31 +02:00
Karol Wypchlo 0e43acd995
fix scripts/blocklist-skylink.sh 2022-06-07 16:27:37 +02:00
Karol Wypchlo 79bae26fcf
fix scripts/portal-down.sh 2022-06-07 16:27:04 +02:00
Karol Wypchło 22c44ad199
Merge branch 'master' into add-shell-scripts-lint 2022-06-07 16:19:06 +02:00
Karol Wypchło dcfac4cea4
Merge branch 'master' into add-shell-scripts-lint 2022-05-27 16:17:07 +02:00
Karol Wypchło 3910c5e35a
Merge branch 'master' into add-shell-scripts-lint 2022-04-27 14:52:23 +02:00
Karol Wypchlo 331c6a5abb
add shellcheck action 2022-03-31 14:56:07 +02:00
4 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,14 @@
name: Lint Shell Scripts
on:
push:
branches:
- main
pull_request:
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ludeeus/action-shellcheck@1.1.0

View File

@ -26,8 +26,8 @@ if test -f "$1"; then
else
echo "Incorrect skylink at line ${line_number}: $line" && exit 1
fi
let line_number+=1
done < $1;
(( line_number++ ))
done < "$1";
else
skylinks=("$1") # just single skylink passed as input argument
fi

View File

@ -20,7 +20,7 @@ fi
countdown() {
local secs=$1
while [ $secs -gt 0 ]; do
while [ "$secs" -gt 0 ]; do
echo -ne "Waiting $secs\033[0K\r"
sleep 1
: $((secs--))
@ -28,10 +28,10 @@ countdown() {
}
# delay disabling the portal
countdown $delay
countdown "$delay"
# stop health-check so the server is taken our of load balancer
docker exec health-check cli disable $reason
docker exec health-check cli disable "$reason"
# then wait 5 minutes for the load balancer to propagate the dns records
countdown $timeout
countdown "$timeout"

View File

@ -33,7 +33,7 @@ fi
# Write the output in an infinite loop.
while true; do
# CPU usage
cpu=$(echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')])
cpu=$((100-$(vmstat 1 2|tail -1|awk '{print $15}')))
sed -i "1iCPU: ${cpu}" $logfile
# Disk Usage