Posts

Can we write pid into a file which store in systemd?

Image
0 I have a script to start java application on boot time. [Unit] Description=test Background [Service] ExecStart=/bin/bash -c "/usr/bin/java -jar /var/www/tset.com/*.jar" Type=simple WorkingDirectory=/var/www/test.com [Install] WantedBy=multi-user.target Can we edit this to write pid into a file in specific location? As an example, ExecStart=/bin/bash -c "/usr/bin/java -jar /var/www/test.com/*.jar | echo $! > ${RUNNING_PID}" startup systemd share | improve this question asked Dec 17 at 3:21 Janith 69 7 ...