#!/bin/sh

set -e

# Start service

systemctl start dvwa

if ! systemctl is-active --quiet dvwa; then
  echo "ERROR: dvwa failed to start" 1>&2
  systemctl --no-pager -l status dvwa
  exit 1
fi

xdg-open "http://127.0.0.1:42001" 2>/dev/null >/dev/null &
