体系的なベストプラクティス、プロジェクト構造

体系的なベストプラクティス、プロジェクト構造

複数のドライバ、これらのドライバを使用する一部のC ++アプリケーション、およびC ++アプリケーションと対話する複数のJavaアプリケーションがあるとします。今まで集めたもの..

ドライバー

[Unit]
Description=Drivers Target
# No contents, just a target for driver services to "register" with

ドライバー-apps.target

[Unit]
Description=Driver-dependent Applications Target
Wants=drivers.target
After=drivers.target

プロジェクトapplication.target

[Unit]
Description(non-driver-dependent) Applications Target
Wants=drivers-apps.target
After=drivers-apps.target

私のドライバーサービス

[Unit]
Description=My Driver
[Service]
Type=oneshot
... # Script that starts driver, with a 'stop' script as well
RemainAfterExit=yes
[Install]
WantedBy=drivers.target

cpp-app.service

[Unit]
Description=C++ Application
ReloadPropagatedFrom=driver-apps.target
PartOf=driver-apps.target
[Service]
...
[Install]
WantedBy=driver-apps.target

cpp-app.service

[Unit]
Description=C++ Application
ReloadPropagatedFrom=driver-apps.target
PartOf=driver-apps.target
[Service]
...
[Install]
WantedBy=driver-apps.target

Java-app.service

[Unit]
Description=C++ Application
ReloadPropagatedFrom=driver-apps.target
PartOf=driver-apps.target
[Service]
...
[Install]
WantedBy=project-apps.target
WantedBy=multi-user.target

私は何かをmultit-user.targetまたは同様の高レベルのターゲットにリンクする必要があることに気づきました。リリース時にすべてのことがスムーズに行われますが、これは正しい構造ですか?

ベストアンサー1

おすすめ記事