fix action test & update readme

This commit is contained in:
IgorKha 2021-10-15 19:20:30 +03:00
parent 8148fedc19
commit 7241b15abe
No known key found for this signature in database
GPG key ID: F283C5AB2D59E902
3 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: deploy with sh script
run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" ""
run: curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh | bash -s --
- name: Test Grafana
run: sleep 5 && curl -ILsS --retry 5 --retry-delay 2 "http://localhost:3000/login"

View file

@ -16,7 +16,7 @@
### Deploy with sh script
```console
sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" "" --config
curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh | bash -s -- --config
```
```console

4
run.sh
View file

@ -62,7 +62,7 @@ ask() {
}
command_exists() {
command -v "$@" || {
command -v "$@" >/dev/null 2>&1 || {
fmt_error "$* is not installed. Please install $* first."
exit 1
}
@ -94,7 +94,7 @@ clone_git() {
router_ip() {
if [[ "${CONFIG}" = yes ]]; then
IP=$(grep -R 'MIKROTIK_IP' "${ENV_FILE}" 2>&1 | cut -d= -f2)
IP=$(grep -R 'MIKROTIK_IP' "${ENV_FILE}" | cut -d= -f2)
echo -e "\n${BLUE}===================================="
echo -e "\n${BOLD}Prometheus${RESET}\n"
if ask "Change target mikrotik IP address ? (current ${IP})" Y; then