Answer the question
In order to leave comments, you need to log in
How to properly run SCREEN program in Linux?
Hello!
Please tell me what is wrong in my command.
I run the screen as the user, the screen is run as the user, and the command itself in the screen ("java") is run as root.
sudo -u vasya screen -dmS servervasya java -XX:MaxPermSize=128M -Xincgc -Xmn380m -Xmx1000M -Xms100M -jar spigot.jar
Answer the question
In order to leave comments, you need to log in
It is better not to run in screen at all, but to use special tools for daemonization. systemd or supervisord
Here is the config for supervisord
[program:servervasya]
directory = путь до приложения
command = java -XX:MaxPermSize=128M -Xincgc -Xmn380m -Xmx1000M -Xms100M -jar spigot.jar
user = vasya
stdout_logfile = /var/log/servervasya_supervisor.log
redirect_stderr = true
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question