0
最近我遇到了systemd这个奇怪的问题,我有一个nodejs应用程序,我使用systemd运行,以及一切正常,直到我对应用程序代码进行任何更改并重新启动我的systemd服务,但是我新做的更改并不反映在执行中(除非我重新启动我的机器)。systemd不刷新更新应用程序代码
我观察的另一件事,如果我使用非常小的应用程序测试代码,然后它按预期工作,我的假设是我的应用程序代码大小可能会导致此行为。
在此先感谢。
[Unit]
Description=sandbox
Documentation=https://example.com
PartOf=appbase.target
[Service]
ExecStart=/home/user/.nvm/versions/node/vx.x.x/bin/node /home/user/repo/Server/SandboxServer.js
Restart=always
Slice=limits.slice
RestartSec=10 # Restart service after 10 seconds if node service crashes
StandardOutput=syslog # Output to syslog
StandardError=syslog # Output to syslog
SyslogIdentifier=sandbox
[Install]
WantedBy=multi-user.target