I'm trying to use some script from
Don't run scripts in
On systemd operating systems there's no guarantee that those scripts even exist, let alone that they are what are specifying your service. Even on Debian 7, there were systemd units supplanting System 5
rc scripts; and this is more so on Debian 8. The correct commands to use are:
systemctl with its
invoke-rc.d, but only if you are a package maintainer script
This is exactly what's happening to you. Your direct invocation of the script is being replaced, via a hook inside a widely used Debian library of scripting functions, with an invocation of (in this particular case)
systemctl restart parstart.service
You can even see this in the output in front of you. It's what the
(via systemctl): parstart.service means. And clearly, far from failing it is succeeding in telling systemd to restart the service.
The interactive bells and whistles inside your
rc script, including coloured messages, are no longer effective. Your service is not run as a child process of
systemctl. It is run as a child process of
systemd and has zero connection with the terminal at which you are interactively running commands.
All of that
/etc/szarp/parstart.cfg scaffolding and log message generation is entirely unnecessary with systemd, anyway. systemd provides cross-service mechanisms for enabling and disabling services, and for auto-restarting them. It logs when it starts and stops services, without need for the services to do that. By my count, that
rc script is quite simply replaceable by 16 ordinary
.service units, one for each service. Here's what one would look like:
Description=The SZARP pserver-lite server
systemctl daemon-reload, and …
- … there's status information available with
systemctl status pserver-lite.service.
- … you enable it for running at bootstrap with
systemctl enable pserver-lite.service.
- … you can see systemd's log entries for starting and stopping it with
It's pretty much that easy for the other 15.