duo_log_sync icon indicating copy to clipboard operation
duo_log_sync copied to clipboard

Feature Request: Please daemonize the applictaion

Open guarismo opened this issue 2 years ago • 3 comments

How can I run thins in the background with a 'screen'? How can I register it as a service in Linux and use systemd?

guarismo avatar Mar 18 '22 17:03 guarismo

I run the duologsync utility as a service with systemd without any problems, you just need to create the systemd service file.

If you want an example, here is the one I'm currently using:

#/etc/systemd/system/duologsync.service
#
[Unit]
Description=Duo Log Sync
After=network-online.target
Requires=network-online.target

[Service]
Type=simple
User=duologsync
Group=duologsync
ExecStart=/var/opt/duo_log_sync/.venv/bin/duologsync /var/opt/duo_log_sync/config/config.yml
Restart=on-failure
RestartSec=5s
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

In my case I created the user and group duologsync and I'm running it from the /var/opt/duo_log_sync, using a .venv.

leandrojmp avatar Jun 21 '22 16:06 leandrojmp

If this could be added to the Readme that would be great.

@leandrojmp the user/group creation doesn't cause a permissions issue with Python?

SysAdminforCoffee avatar Jan 27 '23 14:01 SysAdminforCoffee

@SysAdminforCoffee I didn't had any issues, I was using it with a venv owned by the same user.

I'm not using this tool anymore, since I'm using Elasticsearch, I moved to the Elastic Agent Duo integration.

leandrojmp avatar Jan 27 '23 15:01 leandrojmp