Systemd: Autostart service after mongodb

خرید بک لینک

ubuntu16.04.1, systemd

An application depends on mongodb. The application and mongodb both start on boot as services. app.service containts next line:

After=network.target mongod.service

Unfortunately, the application fails (with connection to database error), I guess, because the mongodb needs some time to startup and be ready to connections (if I start the app later, everything is ok).

It looks like Type=notify (in [Service] section of mongod.service) will solve the problem if mongodb sends apropriate notification to systemd. But I did not find any documentation about it.

The queston is, how to autostart the application, after mongodb will be ready for incoming connections.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: systemd autostart service,systemd autostart daemon,systemd autostart user service,debian systemd service autostart, نویسنده: استخدام کار بازدید: 442 تاريخ: جمعه 29 مرداد 1395 ساعت: 23:28

صفحه بندی