✨ add service-taskchampion verify test
This commit is contained in:
parent
e62d841524
commit
c584bb39ce
1 changed files with 18 additions and 0 deletions
|
@ -8,6 +8,24 @@
|
|||
{
|
||||
|
||||
verify.closed.public.ports.taskchampion = [ config.services.taskchampion-sync-server.port ];
|
||||
verify.localCommands.taskchampion =
|
||||
let
|
||||
domain = "http://orbi.private:10222";
|
||||
curl = lib.getExe pkgs.curl;
|
||||
grep = lib.getExe pkgs.gnugrep;
|
||||
grepString = "TaskChampion sync server";
|
||||
in
|
||||
''
|
||||
if ${curl} -s -o /dev/null -w "%{http_code}" ${domain} | ${grep} -q "200"; then
|
||||
if ${curl} -s ${domain} | ${grep} -q "${grepString}"; then
|
||||
echo "[ OK ] Die Seite hat Statuscode 200 und enthält den String '${grepString}'."
|
||||
else
|
||||
echo "[Fail] Der Statuscode ist 200, aber die Seite enthält den String '${grepString}' nicht."
|
||||
fi
|
||||
else
|
||||
echo "[Fail] Die Seite hat keinen Statuscode 200."
|
||||
fi
|
||||
'';
|
||||
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [
|
||||
config.services.taskchampion-sync-server.port
|
||||
|
|
Loading…
Reference in a new issue