Files
dotfiles/.config/rofi/scripts/traefik.sh
2020-03-20 11:11:00 +01:00

7 lines
370 B
Bash
Executable File

#!/bin/bash -x
TRAEFIK="http://traefik.docker.localhost"
DOMAIN="docker.localhost"
SERVICES=$(curl ${TRAEFIK}/api/http/routers |jq ".[].rule" |grep "${DOMAIN}" |awk -F\` '{print $2}')
SELECTION=$(echo -e "$SERVICES" | uniq -u | rofi -dmenu -p "Select traefik service: " -theme ~/.config/rofi/themes/app-launcher)
[ ! -z "$SELECTION" ] && xdg-open "http://${SELECTION}"