2 I don't think this is a duplicate question
source | link

I am trying to control a continuously running license server on a workstation using systemd. The service itself is started by a shell script, which is essentially

Usage: ./rlm_control.sh {start|stop|restart|status}

From this I created a systemd service file:

[Unit]
Description=RLM License Server
After=network.target

[Service]
Type=forking
ExecStart=/path/to/rlm_control.sh start
ExecStop=/path/to/rlm_control.sh stop
ExecReload=/path/to/rlm_control.sh restart
User=chris
Restart=on-failure

[Install]
WantedBy=multi-user.target

The problem is that this control script actually forks off another process with its own logs rlm. The logs of rlm_control.sh are found by journald, but the logs of rlm are not.

Is it possible to tell journald somehow to essentially append the output of tail -f /path/to/rlm.log to the journal of this service?

EDIT: I noticed this was asked before [0], but that solution seems to suggest appending the logs using a command, not adjusting the service file to read from another log file as well.

[0] Forward logs from file to journald

I am trying to control a continuously running license server on a workstation using systemd. The service itself is started by a shell script, which is essentially

Usage: ./rlm_control.sh {start|stop|restart|status}

From this I created a systemd service file:

[Unit]
Description=RLM License Server
After=network.target

[Service]
Type=forking
ExecStart=/path/to/rlm_control.sh start
ExecStop=/path/to/rlm_control.sh stop
ExecReload=/path/to/rlm_control.sh restart
User=chris
Restart=on-failure

[Install]
WantedBy=multi-user.target

The problem is that this control script actually forks off another process with its own logs rlm. The logs of rlm_control.sh are found by journald, but the logs of rlm are not.

Is it possible to tell journald somehow to essentially append the output of tail -f /path/to/rlm.log to the journal of this service?

I am trying to control a continuously running license server on a workstation using systemd. The service itself is started by a shell script, which is essentially

Usage: ./rlm_control.sh {start|stop|restart|status}

From this I created a systemd service file:

[Unit]
Description=RLM License Server
After=network.target

[Service]
Type=forking
ExecStart=/path/to/rlm_control.sh start
ExecStop=/path/to/rlm_control.sh stop
ExecReload=/path/to/rlm_control.sh restart
User=chris
Restart=on-failure

[Install]
WantedBy=multi-user.target

The problem is that this control script actually forks off another process with its own logs rlm. The logs of rlm_control.sh are found by journald, but the logs of rlm are not.

Is it possible to tell journald somehow to essentially append the output of tail -f /path/to/rlm.log to the journal of this service?

EDIT: I noticed this was asked before [0], but that solution seems to suggest appending the logs using a command, not adjusting the service file to read from another log file as well.

[0] Forward logs from file to journald

1
source | link

How to append systemd service logs to the journal

I am trying to control a continuously running license server on a workstation using systemd. The service itself is started by a shell script, which is essentially

Usage: ./rlm_control.sh {start|stop|restart|status}

From this I created a systemd service file:

[Unit]
Description=RLM License Server
After=network.target

[Service]
Type=forking
ExecStart=/path/to/rlm_control.sh start
ExecStop=/path/to/rlm_control.sh stop
ExecReload=/path/to/rlm_control.sh restart
User=chris
Restart=on-failure

[Install]
WantedBy=multi-user.target

The problem is that this control script actually forks off another process with its own logs rlm. The logs of rlm_control.sh are found by journald, but the logs of rlm are not.

Is it possible to tell journald somehow to essentially append the output of tail -f /path/to/rlm.log to the journal of this service?