Don't run systemd with sudo.
Change 'USER' to 'vagrant' and use 'bash -l -c' instead of 'su - vagrant -c'.
Change-Id: I567f58115b0fd6b58a39b8850539766ef913f44c
diff --git a/Changes b/Changes
index 52f7683..871caec 100755
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+3.1 2019-12-18
+ - Don't run systemd with sudo
+
3.0 2019-09-25
- Updates:
- Koral: v0.34
diff --git a/Vagrantfile b/Vagrantfile
index 642232d..a4d9e5d 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -238,9 +238,9 @@
After=network.target
[Service]
-User=root
+User=vagrant
Type=forking
-ExecStart=/bin/su - vagrant -c 'cd /home/vagrant/Built ; nohup java -jar Kustvakt-lite.jar & echo" '$!' " > kustvakt.pid'
+ExecStart=/bin/bash -l -c 'cd /home/vagrant/Built ; nohup java -jar Kustvakt-lite.jar & echo" '$!' " > kustvakt.pid'
PIDFile=/home/vagrant/Built/kustvakt.pid
KillMode=process
@@ -252,12 +252,12 @@
After=network.target
[Service]
-User=root
+User=vagrant
Type=forking
PIDFile=/home/vagrant/Kalamar/script/hypnotoad.pid
-ExecStart=/bin/su - vagrant -c 'MOJO_MODE=vagrant KALAMAR_API=\"http://localhost:5556/api/\" /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad /home/vagrant/Kalamar/script/kalamar'
-ExecStop=/bin/su - vagrant -c 'MOJO_MODE=vagrant /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad -s /home/vagrant/Kalamar/script/kalamar'
-ExecReload=/bin/su - vagrant -c 'MOJO_MODE=vagrant KALAMAR_API=\"http://localhost:5556/api/\" /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad /home/vagrant/Kalamar/script/kalamar'
+ExecStart=/bin/bash -l -c 'MOJO_MODE=vagrant KALAMAR_API=\"http://localhost:5556/api/\" /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad /home/vagrant/Kalamar/script/kalamar'
+ExecStop=/bin/bash -l -c 'MOJO_MODE=vagrant /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad -s /home/vagrant/Kalamar/script/kalamar'
+ExecReload=/bin/bash -l -c 'MOJO_MODE=vagrant KALAMAR_API=\"http://localhost:5556/api/\" /home/vagrant/perl5/perlbrew/perls/perl-5.24.0/bin/hypnotoad /home/vagrant/Kalamar/script/kalamar'
killMode=process
[Install]