Closed Barolina closed 8 months ago
@Barolina Not sure if this is what you're looking for, but fwiw, here is my setup:
sudo vim /etc/systemd/system/pgsync.service
[Unit]
Description=pgsync daemon
After=network.target
[Service]
WorkingDirectory=/home/xxxx/pgsync
ExecStart=/home/xxxx/pgsync/env/bin/pgsync --daemon
User=xxxx
Restart=always
RestartSec=10
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable pgsync
sudo systemctl start pgsync
sudo systemctl status pgsync
You can follow the output of pgsync with:
sudo journalctl -u pgsync -f
Thank you
Please,
do I need to write the -d command to systemd? right?