Description=jabber bot entertaining and supporting activity on jabber MUCs
[Service]
+ExecStartPre=/home/{{ botuser }}/wait-for-rabbitmq.sh
ExecStart={{ venv_chatbot }}/bin/urlbotd-chat
WorkingDirectory=/home/{{ botuser }}/urlbot-v3/
StandardOutput=journal+console
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=default.target
Description=jabber bot entertaining and supporting activity on jabber MUCs
[Service]
+ExecStartPre=/home/{{ botuser }}/wait-for-rabbitmq.sh
ExecStart={{ venv_worker }}/bin/urlbotd-worker
WorkingDirectory=/home/{{ botuser }}/urlbot-v3/
StandardOutput=journal+console
Restart=always
[Install]
-WantedBy=multi-user.target
+WantedBy=default.target
--- /dev/null
+#!/bin/bash
+
+# TODO: parse amqp_uri, insert here
+while ! echo > /dev/tcp/localhost/5672; do
+ echo "waiting for remote service..."
+ sleep 5s
+done