
この systemd ユニット ファイルは/etc/systemd/system/ei-integrator.service
以下のとおりです。
[Unit]
Description=Integrator
After=network.target
[Service]
ExecStart=/tmp/ei-6.6.0/bin/integrator.sh start
ExecStop=/tmp/ei-6.6.0/bin/integrator.sh stop
ExecRestart=/tmp/ei-6.6.0/bin/integrator.sh restart
PIDFile=/tmp/ei-6.6.0/pid.pid
User=wso2user
Group=wso2
Type=forking
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
そして、それを実行しようとすると、systemctl start ei-integrator.service
次のエラーが発生します。
/etc/systemd/system/ei-integrator.service:8: セクション「Service」に不明なキー名「ExecRestart」があるため、無視します。
誰か助けてくれませんか?
使っていますUbuntu 20.04.4 LTS
答え1
正しい構文は「ExecReload」です。「ExecRestart」の代わりに「ExecReload」を使用して、動作するかどうかを確認してください。
使用可能な Exec コマンドについては、次のドキュメントを参照してください。 https://www.freedesktop.org/software/systemd/man/systemd.service.html
さらなる議論はここでご覧いただけます: https://github.com/wso2/puppet-ei/issues/70 https://systemd-devel.freedesktop.narkive.com/Ln2Sc9Ot/execrestart