I have a Linux version of my application built with install4j and I do not know how to make the service run under a user account. Is there a recommended way to do so?
You can start a service as a different user by editing the launcher, going to the "Executable info->Unix options" step and setting the "custom script fragment" to
if [ ! $USER = "userName" ]; then
exec su - userName $prg_dir/$progname $@
fi
where "userName" should be replaced with the desired user name. It's not possible to use installer variables here as the change will be made to the start script at compile time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With