Using systemctl

Initial Release: 24.10T-1

Starting from version 24.10T-2, the 'netconfd-pro' service is now manageable via systemctl, aligning with Linux system standards. This guide provides instructions on how to use 'systemctl' to manage the 'netconfd-pro' service.

The 'netconfd-pro' service file should be installed in the systemd service directory at /lib/systemd/system/netconfd-pro.service.

Enabling the netconfd-pro Service

To enable the 'netconfd-pro.service' to start automatically on system boot:

sudo systemctl enable netconfd-pro

To disable the automatic startup:

sudo systemctl disable netconfd-pro

Running netconfd-pro Service

Before starting the 'netconfd-pro' service, ensure it is not already running:

pgrep netconfd-pro

sudo pkill netconfd-pro

The service starts with the --fileloc-fhs='true' CLI parameter and uses the default --config path at /etc/yumapro/netconfd-pro.conf. To specify a different --config file or add additional CLI parameters, set them via environment variables:

sudo systemctl set-environment NETCONFD_PARAMS="--config=/home/user-1/netconfd-pro.conf --log=/home/user-1/server2024-11-21.log --log-level=debug4"

systemctl show-environment

Then start the service:

sudo systemctl start netconfd-pro

To check the current status of the service:

systemctl status netconfd-pro

Example status output:

user-1@hostname-1:~$ systemctl status netconfd-pro
● netconfd-pro.service - YumaPro Server
     Loaded: loaded (/lib/systemd/system/netconfd-pro.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-11-21 11:30:58 PST; 2s ago
       Docs: man:netconfd-pro
             https://docs.yumaworks.com
   Main PID: 78876 (netconfd-pro)
      Tasks: 5 (limit: 76882)
     Memory: 6.0M
        CPU: 58ms
     CGroup: /system.slice/netconfd-pro.service
             └─78876 /usr/sbin/netconfd-pro --fileloc-fhs=true --config=/home/user-1/netconfd-pro.conf --log=/home/user-1/server2024-11-21.log --log-level=debug4

Nov 21 11:30:58 hostname-1 systemd[1]: Started YumaPro Server.

Stopping and Restarting the Service

To restart the service:

sudo systemctl restart netconfd-pro

To reload the configuration without restarting the service:

sudo systemctl reload netconfd-pro

If unsure whether to reload or restart, use:

sudo systemctl reload-or-restart netconfd-pro

To stop the service:

sudo systemctl stop netconfd-pro

Warning

If 'netconfd-pro' was started manually (outside of systemd management), 'systemctl' commands will not manage or control it.