diff --git a/templates/etc.init.d.iqserver.j2 b/templates/etc.init.d.iqserver.j2 index 003bd3f..02df89f 100644 --- a/templates/etc.init.d.iqserver.j2 +++ b/templates/etc.init.d.iqserver.j2 @@ -22,7 +22,7 @@ RUN_AS_USER={{ iqserver_user }} do_start() { cd $NEXUS_IQ_SERVER_HOME - su -m $RUN_AS_USER -c "java $JAVA_OPTIONS -jar nexus-iq-server-$VERSION.jar server config.yml > /dev/null 2>&1 &" + java $JAVA_OPTIONS -jar nexus-iq-server-$VERSION.jar server config.yml echo "Started nexus-iq-server" } diff --git a/templates/etc.systemd.system.iqserver.service.j2 b/templates/etc.systemd.system.iqserver.service.j2 index 97f349c..c120a0c 100644 --- a/templates/etc.systemd.system.iqserver.service.j2 +++ b/templates/etc.systemd.system.iqserver.service.j2 @@ -7,9 +7,7 @@ After=network.target Type=simple ExecStart=/etc/init.d/iqserver start ExecStop=/etc/init.d/iqserver stop - -# the initd script will run this as {{ iqserver_user }} -User=root +User={{ iqserver_user }} Restart=on-abort [Install]