Dear friends and colleges ,
We have service under /etc/systemd/system
Service name is calc_live_servers.service
Since Restart=always
is configured in calc_live_servers.service
Then when we kill
the PID
of the process or kill -9
, then service is restarted again and will be up
is it possible to kill the PID
so service will not start again after we kill it in spite Restart=always
?
The service calc_live_servers.service
[Unit]
Description=calc_servers Server
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=65535
Type=simple
User=CAS
Group=CAS
ExecStart=/usr/bin/calc_servers-start /etc/calc_servers/calc_servers.properties
ExecStop=/usr/bin/calc_servers-stop
Restart=always
[Install]
WantedBy=multi-user.target
Main target - is to stop the service by kill the PID without use systemctl stop <SERVICE NAME >
and that because sometimes stopping the service not really stop it