Answer the question
In order to leave comments, you need to log in
systemd service | How to update a daemon file without having to stop the process?
For example, there is such a service file:
[Unit]
Description=App name
After=syslog.target
[Service]
WorkingDirectory=/home/user/app
ExecStart=/home/user/app/app
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=app-name
User=user
Group=user
LimitNOFILE=infinity
[Install]
WantedBy=multi-user.target
Answer the question
In order to leave comments, you need to log in
On Linux, if a file cannot be written to, it can usually be renamed and even deleted. And write anything in its place.
Write your updated app as /home/user/app/app.new and run the commands:
mv /home/user/app/app /home/user/app/app.old
mv /home/user/app/app.new /home/user/app/app
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question