06/12/2022 - 23:42
מדובר על RaspberryPI עם מסך חיצוני. במיקרה שהוא התחבר לרשת, אני רוצה שהוא יפעיל:
קוד
ככה יציג על המסך שלו דברים מגניבים (בהחלט שטות, אל תשפטו אותי). החלטתי לעשות system service שיטפלבזה:
[Unit]
Description="Run bpytop on console"
[Service]
Type=oneshot
ExecStart=/bin/open /bin/bash /usr/local/bin/banner.sh
TimeoutStartSec=1m
[Install]
WantedBy=network-online.target
זאת השגיאה שאני רואה:
קוד
והתוכן של התסריט המדובר הוא:
קוד
למישהו יש רעיון איך לטפל בזה?
bpytop > /dev/console
ככה יציג על המסך שלו דברים מגניבים (בהחלט שטות, אל תשפטו אותי). החלטתי לעשות system service שיטפלבזה:
[Unit]
Description="Run bpytop on console"
[Service]
Type=oneshot
ExecStart=/bin/open /bin/bash /usr/local/bin/banner.sh
TimeoutStartSec=1m
[Install]
WantedBy=network-online.target
זאת השגיאה שאני רואה:
pie@raspberrypi:~ $ sudo systemctl status-banner.service
● banner.service - "Run bpytop on console"
Loaded: loaded (/etc/systemd/system/banner.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-12-06 21:36:35 GMT; 3min 20s ago
Process: 401 ExecStart=/bin/open /bin/bash /usr/local/bin/banner.sh (code=exited, status=3)
Main PID: 401 (code=exited, status=3)
CPU: 546ms
Dec 06 21:36:33 raspberrypi systemd[1]: Starting "Run bpytop on console"...
Dec 06 21:36:35 raspberrypi open[401]: Error: no "view" mailcap rules found for type "application/x-pie-executable"
Dec 06 21:36:35 raspberrypi open[401]: Error: no "view" mailcap rules found for type "application/x-sh"
Dec 06 21:36:35 raspberrypi systemd[1]: infiniplex-banner.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Dec 06 21:36:35 raspberrypi systemd[1]: infiniplex-banner.service: Failed with result 'exit-code'.
Dec 06 21:36:35 raspberrypi systemd[1]: Failed to start "Run bpytop on console".
והתוכן של התסריט המדובר הוא:
pie@raspberrypi:~ $ cat /usr/local/bin/banner.sh
#! /bin/sh
bpytop --boxes "net cpu mem" > /dev/console
למישהו יש רעיון איך לטפל בזה?
נערך לאחרונה על-ידי elcuco בתאריך 07/12/2022 - 06:38, סך-הכל נערך פעם אחת