Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The aim is to schedule repagent to run only in certain times via a cron job.
After stopping repagent with:
systemctl stop repagent
there are still repctl processes running and moving data despite the fact that repagent service is stopped.
Is there a best practice how to stop repagent so that also the repctl processes are stopped?
Hi Dobak,
According to our public doc[1], you need to run the following command to stop the service.
sudo service repagent stop
I hope this helps, and please let me know if there is anything else we can assist you with.
Kind Regards,
Martin
Hi Martin the command service is depreciated and an equivalent to systemctl which was introduced with systemd.
i am running the command under user root so i do not need the sudo.
Hi Dobak,
Since you are logged as root, you can skip the sudo.
You are almost right about the commands. However, there is a slight difference between both them and that is causing you trouble. Let me quickly explain it.
The service command looks up the script to run at the path /etc/init.d/SCRIPT. While the systemctl command interacts with the SystemD service manager to manage the services.
SystemD stores the unit files in /etc/systemd/system/ and /lib/systemd/system and if you check the repagent file in those locations you won't be able to find it.
Therefore, I'd encourage you to refer to our public documentation to avoid any issues.
I hope it helps!
Kind Regards,
Martin
hi i tried now both systemctl and service but could not reproduce the issue anymore. i will write here once it should happen again and i have the exact steps to reproduce.
regarding systemctl: it is using the same startup script as service so that should not be a problem.
$ systemctl status repagent
● repagent.service - SYSV: Attunity Replicate service management
Loaded: loaded (/etc/rc.d/init.d/repagent; generated)
Active: inactive (dead) since Fri 2023-02-24 07:09:06 UTC; 2 days ago
Docs: man:systemd-sysv-generator(8)
Process: 32046 ExecStop=/etc/rc.d/init.d/repagent stop (code=exited, status=0/SUCCESS)
Process: 18315 ExecStart=/etc/rc.d/init.d/repagent start (code=exited, status=0/SUCCESS)