Article 4VMC3 SLES12 : How to run a process with a specific user?

SLES12 : How to run a process with a specific user?

by
akshays
from LinuxQuestions.org on (#4VMC3)
I want to run a process with a specific user.

On RHEL 7, I am able to this with:

source /etc/rc.d/init.d/functions
daemon --user=myuser $JAVA_HOME/bin/java -cp $appClassPath $MAIN_CLASS

How can I achieve the same behavior on SLES12? The /etc/rc.d/init.d/functions is not available on SLES12.

Is it possible to achieve same thing without installing any new modules?

EDIT: Actually this script is called from my systemd unit file and must run at the time of boot.latest?d=yIl2AUoC8zA latest?i=ASO68aaBQhY:TSpM1nkTYTk:F7zBnMy latest?i=ASO68aaBQhY:TSpM1nkTYTk:V_sGLiP latest?d=qj6IDK7rITs latest?i=ASO68aaBQhY:TSpM1nkTYTk:gIN9vFwASO68aaBQhY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments