Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service motd-stat start wont work #2

Open
ITDarmstadt opened this issue Jan 27, 2024 · 2 comments
Open

service motd-stat start wont work #2

ITDarmstadt opened this issue Jan 27, 2024 · 2 comments

Comments

@ITDarmstadt
Copy link

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
Copy link
Author

What would be nice to, is a remove method

@dsnet
Copy link
Owner

dsnet commented Jan 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants