motd-generator icon indicating copy to clipboard operation
motd-generator copied to clipboard

service motd-stat start wont work

Open ITDarmstadt opened this issue 1 year ago • 2 comments

Feedback from the journalctl -xeu motd-stat.service

For Debian 6.1.55-1 the Script is not working. Is something missing?

Error-Output:

Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD systemd[1]: Starting motd-stat.service - LSB: Starts the MOTD statistics monitor... ░░ Subject: A start job for unit motd-stat.service has begun execution ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ A start job for unit motd-stat.service has begun execution. ░░ ░░ The job identifier is 21665. Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD motd-stat[2554009]: Starting motd_stat: Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD motd-stat[2554009]: motd_stat not started ... failed! Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD systemd[1]: motd-stat.service: Control process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ An ExecStart= process belonging to unit motd-stat.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD systemd[1]: motd-stat.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ The unit motd-stat.service has entered the 'failed' state with result 'exit-code'. Jan 27 02:14:44 VM-ITDA-DMZ-CLOUD systemd[1]: Failed to start motd-stat.service - LSB: Starts the MOTD statistics monitor. ░░ Subject: A start job for unit motd-stat.service has failed ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ A start job for unit motd-stat.service has finished with a failure. ░░ ░░ The job identifier is 21665 and the job result is failed.

Also after login in SSH the MOTD looks like this now:

Using username "root". Last login: Sat Jan 27 02:47:24 2024 from x.x.x.x /usr/bin/env: „python“: Datei oder Verzeichnis nicht gefunden "File or Folder is missing" -bash: /root/.bashrc_motd: Datei oder Verzeichnis nicht gefunden "File or Folder is missing" -bash: bash_motd: Kommando nicht gefunden. "not found"

ITDarmstadt avatar Jan 27 '24 01:01 ITDarmstadt

What would be nice to, is a remove method

ITDarmstadt avatar Jan 27 '24 01:01 ITDarmstadt

The motd_stat file is a legacy init.d style script.

Here's the more modern systemd service script that I've been using:

[Unit]
StartLimitIntervalSec=0
StartLimitBurst=0

[Service]
ExecStart=/usr/local/motd_gen/motd_stat.py
WorkingDirectory=/usr/local/motd_gen
User=root
Group=root
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

dsnet avatar Jan 28 '24 03:01 dsnet