From 2ac806f8e106e2e4df0852db8f112aa20424e716 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Fri, 9 Apr 2021 14:57:26 +0200 Subject: [PATCH] Versie 1.0.1 --- ober/meson.build | 2 +- ober/mvoau.service | 3 ++- ober/source/app.d | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ober/meson.build b/ober/meson.build index aa30b1c..e978e06 100644 --- a/ober/meson.build +++ b/ober/meson.build @@ -1,6 +1,6 @@ project( 'MVOAU Ober', 'd', - version: '1.0.0', + version: '1.0.1', license: 'MIT', meson_version: '>= 0.52' ) diff --git a/ober/mvoau.service b/ober/mvoau.service index 74ae63a..f07cdfd 100644 --- a/ober/mvoau.service +++ b/ober/mvoau.service @@ -5,8 +5,9 @@ After=network-online.target [Service] Environment="WACHTTIJD=15" +Environment="OBER=127.0.0.1" Type=idle -ExecStart=mvoau $WACHTTIJD +ExecStart=mvoau $WACHTTIJD $OBER Restart=on-failure RestartSec=3 User=root diff --git a/ober/source/app.d b/ober/source/app.d index ae26ccf..d68fb7a 100644 --- a/ober/source/app.d +++ b/ober/source/app.d @@ -238,7 +238,7 @@ public: */ bool gebruikersActief() { auto resultaat = execute(["who"]); - return resultaat.output.splitLines().length == 0; + return resultaat.output.splitLines().length 1= 0; } void sluitAf() { @@ -257,7 +257,7 @@ int main(string[] args) { } } else { scope(failure) stderr.writefln("GEBRUIK: %s WACHTTIJD", args[0]); - if (args.length < 2) { + if (args.length < 3) { stderr.writefln("GEBRUIK: %s WACHTTIJD", args[0]); return -1; }