つくってみた。
スクリプトを修正したら
systemctl daemon-reloadを実行しないと変更が反映されない。
/etc/systemd/system/nodemanager.service
## create new file /etc/systemd/system/nodemanager.service for nodemanager,
## then systemctl daemon-reload
[Unit]
Description=Controls Weblogic NodeManager Service
After=network.target sshd.service
[Service]
#ExceStartがフォアグラウンドで動作するコマンドの場合にsimple指定
Type=simple
ExecStart=<domain_home>/bin/startNodeManager.sh
ExecStop =<domain_home>/bin/stopNodeManager.sh
#oracle:oinstallユーザとして実行
User=oracle
Group=oinstall
#異常終了しても再起動しない
Restart=no
#ExceStartが300秒待っても実行できなかったらタイムアウトと判定
#(ExecStartコマンドはフォアグラウンド動作なのでここには影響しない)
TimeoutStartSec=300
#ExceStopが300秒待っても終了しない場合はタイムアウト判定->SIGTERM
TimeoutStopSec=300
KillMode=process
#StandardOutput=append:/var/log/nm.out
#StandardError=inherit
[Install]
WantedBy=default.target
/etc/systemd/system/weblogic.service
## create new file /etc/systemd/system/adminserver.service for adminserver,
## then systemctl daemon-reload
[Unit]
Description=Controls Weblogic AdminServer Service
After=network.target sshd.service nodemanager.service
Requires=nodemanager.service
[Service]
#ExceStartがフォアグラウンドで動作するコマンドの場合にsimple指定
Type=simple
ExecStart=<domain_home>/bin/startWebLogic.sh
ExecStop =<domain_home>/bin/stopWebLogic.sh
#oracle:oinstallユーザとして実行
User=oracle
Group=oinstall
#異常終了しても再起動しない
Restart=no
#ExceStartが1200秒待っても実行できなかったらタイムアウトと判定
TimeoutStartSec=1200
#ExceStopが1200秒待っても終了しない場合はタイムアウト判定->SIGTERM
TimeoutStopSec=1200
KillMode=process
#StandardOutput=append:/var/log/webloigc-admin.out
#StandardError=inherit
[Install]
WantedBy=multi-user.target