web stats
Start up Mirth as non-root Debian Stretch - Mirth Community

Go Back   Mirth Community > Mirth Connect > Development

Reply
 
Thread Tools Display Modes
  #1  
Old 10-26-2017, 02:18 AM
Peanut Peanut is offline
Mirth Newb
 
Join Date: Aug 2017
Posts: 13
Peanut is on a distinguished road
Default Start up Mirth as non-root Debian Stretch

Please let me know if I'm not understanding this correctly. I'm not a Java developer. I asked this or similar question in the support section of the forum but nobody had anything to say or didn't care.

/etc/init.d/mirthservice is a link to the startup script that executes a whole bunch of stuff to make Mirth Connect run. Compared to other Java applications there seems to be no "wrapper" where you can define a user or other variables to pass on to the script. Other Java applications have this feature in their start up scripts.

Here is an example of I think is the beginning of a Java wrapper of what I have seen/read on the internet:

Code:
#! /bin/sh
### BEGIN INIT INFO
# FIXME: set Provides and Short-Description
# Provides:          My java app
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: initscript for My java app
### END INIT INFO

# FIXME: your name here
# Author: Leonid Shevtsov <leonid@shevtsov.me>

# Do NOT "set -e"

PATH=/sbin:/usr/sbin:/bin:/usr/bin
# FIXME: configure your app here
DESC="My Java app"
NAME="my-java-app"
CWD=/home/my-java-app/apps/my-java-app/current
USER=my-java-app
GROUP=my-java-app
JAVA=/usr/bin/java
JVM_ARGS=
JAR_PATH=/home/my-java-app/apps/my-java-app/current/target/my-java-app.jar
JAVA_ARGS="$JVM_ARGS -jar $JAR_PATH"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
.
.
.
How would I go about to modify the operating system to start Mirth Connect as a non root user? Is this something you can solve right in Java? Does it even matter to have Mirth Connect start as non user? People talk so casually about having all your services start as non root if have a server out on the internet/cloud... but how do you implement this for Mirth Connect? Am I crazy for asking this question?

I hope I'm making sense...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation