I have set up an application running in 2 servers:
- Server 1 contains the main Administration module
- Server 2 contains additional modules that need to start up after the Admin module is up and running
and have created the systemd files to start up things automatically after a reboot.
So server 1 has something like:
admin.service
[Unit]
Description=Start Admin
[Service]
Type=simple
ExecStart=/home/usr/startup/startAdmin.sh
ExecStop=/home/usr/startup/stopAdmin.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
and server 2 has something like:
other.service
[Unit]
Description=Start Others
[Service]
Type=simple
ExecStart=/home/usr/startup/startOther.sh
ExecStop=/home/usr/startup/stopOther.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
What can be implemented to ensure other.service (in server 2) only kicks off if admin.service has started?