Hi,
I'm having a strange problem with systemcl.
My configuration in /lib/systemd/system/test.service looks like this:
[Unit]
Description=MY Test Service
After=syslog.target network.target
[Service]
# systemd ignores PAM limits, so set any necessary limits in the service.
# # Not really a bug, but a feature.
# # https://bugzilla.redhat.com/show_bug.cgi?id=754285
# LimitMEMLOCK=infinity
# LimitNOFILE=65535
#
Type=simple
RemainAfterExit=yes
User=root
Group=root
ExecStart= /usr/bin/echo "Starting Test Service"
ExecStop= /usr/bin/echo "Stopping Test Service"
[Install]
WantedBy=multi-user.target
I have also enabled this services with:
# ln -s /lib/systemd/system/test.service /etc/systemd/system/test.service
# systemctl daemon-reload
# systemctl start test.service
# systemctl enable test.service
If I than run systemctl start test.service and systemctl stop test.service I get what i want. My services are stopped and started without any problems.
The Problem happens after restarting the server. After reboot the service is started, but before shutting down, the service had to stop first. This is not happening.
Any idea why is this not working?