Demande de mise en place d'un bouton arrêt et redémarrage du raspberry

Bonjour,

J’ai pas trouver de opic parlant de çà mais un bouton pour arrêter/redemarrer proprement le raspberry depuis gladys serait un plus.

Je pense qu’il aurait sa place au niveau du menu système pour les administrateurs.

J’ai rapidement vu que c’était possible d’éteindre l’hôte depuis un docker mais j’ai pas fait le test.

Pourquoi pas, bonne idée :slight_smile:

Sinon :
Ouvrir un terminal (“cmd” dans la barre de recherche sous windows ou ctrl+alt+T sous linux)
ssh pi@ip-de-gladys
mdp du pi (raspberry la première fois)
sudo shutdown now

Ce qui est un peu moins user friendly il faut l’avouer haha

1 Like

petite précision lorsque l’on se connecte la première fois il demande le changement de mot de passe du compte pi.

Je demande çà car Gladys est dans une démarche user friendly. c’est comme si dans windows on te disait de taper la commande shutdown /s à chaque fois pour arrêter ton pc.

C’est juste que des fois mon raspberry est arrêté de façon brutale car mon pc est pas forcément allumer.

Après c’est pas une feature a développer en urgence car pour la majorité nous savons aller sur un système linux et l’arrêter proprement.

Je suis 100% d’accord avec toi, dans la v4 la principale philosophie c’est « pas de CLI, pas de SSH ».

Hi @pierre-gilles
There is a possibility to have a cron on the Pi that runs a script, say every second
this script can be created in Gladys then copied into the local system
26 commandes Docker les plus courantes avec des exemples partie 19
From there any command can be executed (stop/restart etc.) from the Gladys container on the local system, you just need at startup to have a script that deletes the script previously sent from

That’s indeed an idea, however it’s too risky for me — it’s enough that the script(s) are not deleted and we’ll restart in a loop.

In any case we are in server mode, the need to stop/restart is almost nil.

The only case is a kernel update; in that case you do it manually and can therefore reboot.

There is the possibility of limiting the number of times the script can be executed by using a timestamp-based limit in the script name, for example, or better via crontab, right? So a crontab running every second that watches a script sent from Gladys; in the script there is the 1st crontab command to execute so there’s no risk of a loop, and we can have a log that can be analyzed by a 2nd crontab command of the previous script, which itself can generate a response via a crontab that creates a command in the Gladys container. In short, a way for Gladys to interact with its environment…this could even be integrated into Gladys with scenarios! :face_with_open_eyes_and_hand_over_mouth:

I think the cleanest approach for the host is to use D-Bus (dbus); there’s a Node.js package available.

On the Gladys side we can

Whatever the solution, it would be a real plus for the average user to be able to shut down their system properly (for maintenance purposes, for example) without having to go through an SSH connection that’s not user-friendly! I don’t know D-Bus; would it also work on platforms other than the Raspberry Pi and/or on Windows?