NEWS
Fehlermeldung beim Versuch ioBroker zu stoppen
-
pi@RasPi4-VNC:~ $ cat /usr/bin/iobroker #!/usr/bin/bash if [ "1000" = 0 ] && [[ != *--allow-root* ]]; then echo -e "\n*** ioBroker is not supposed to be run as root. Sorry ***\nOnly a user that is member of iobroker group can execute ioBroker commands.\nPlease read the Documentation on how to set up such a user, if not done yet.\nOnly in very special cases you can run iobroker with --allow-root option.\nPlease note that this option may be disabled soon, so please change your setup accordingly now." exit; fi; if (( $# == 1 )) && ([ "$1" = "start" ] || [ "$1" = "stop" ] || [ "$1" = "restart" ]); then sudo systemctl $1 iobroker elif [ "$1" = "fix" ]; then curl -sL https://iobroker.net/fix.sh | bash - elif [ "$1" = "nodejs-update" ]; then sudo -u iobroker curl -sLf https://iobroker.net/node-update.sh --output /home/iobroker/.nodejs-update.sh && bash /home/iobroker/.nodejs-update.sh "$2" elif [ "$1" = "diag" ]; then sudo -u iobroker curl -sLf https://iobroker.net/diag.sh --output /home/iobroker/.diag.sh && bash /home/iobroker/.diag.sh | sudo -u iobroker tee /home/iobroker/iob_diag.log else sudo -H -u iobroker node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js "$@" fi
-
-
Wie und was denn ändern?
Und wieso habe ich jetzt hier überhaupt ein Problem?
Das hat doch sonst immer geklappt? -
@hg6806 sagte in Fehlermeldung beim Versuch ioBroker zu stoppen:
Wie und was denn ändern?
Steht doch da. Im Grunde aus der
1000
ein$(id -u)
machen.
Heute ist neuer Code für iob diag, iob nodejs-update und den Installer hochgeladen worden. Die Passage, die da jetzt bei dir Probleme bereitet sollte eigentlich auch anders aussehen. -
Sorry, bin kein Linuxer. Nochmal die Frage wie ich was ändern soll. Welche Datei und wie?
-
Alternativ kannst du auch die Zeilen 3-6 komplett löschen.
-
Aus der Datei /usr/bin/bash oder wie?
-
Die Datei /usr/bin/iobroker bzw. deren Linktarget
/opt/iobroker/iobroker
mit dem Editor deiner Wahl bearbeiten.sudo -H -u iobrokoer nano /usr/bin/iobroker
wäre eine Möglichkeit.
-
Noch immer Fehler.
pi@RasPi4-VNC:~ $ iob stop /usr/bin/iob: line 2: conditional binary operator expected /usr/bin/iob: line 2: syntax error near `*--allow-root*' /usr/bin/iob: line 2: `if [ "$(id -u)" = 0 ] && [[ != *--allow-root* ]]; then'
-
@hg6806 sagte in Fehlermeldung beim Versuch ioBroker zu stoppen:
Noch immer Fehler.
Ja, da fehlt noch ein
$*
vor dem!=
Die korrekte Zeile muss lauten:if [ "$(id -u)" = 0 ] && [[ $* != *--allow-root* ]]; then
-
Hat endlich geklappt, allerdings kann ich kein Restore ausführen zumindest passiert nichts:
pi@RasPi4-VNC:~ $ cd /opt/iobroker pi@RasPi4-VNC:/opt/iobroker $ iob restore 0 pi@RasPi4-VNC:/opt/iobroker $ iob restore 0 pi@RasPi4-VNC:/opt/iobroker $
-
Den user 'pi' hast du aus- und wieder eingeloggt?
-
Neu gebootet, das Gleiche
pi@RasPi4-VNC:~ $ cd /opt/iobroker pi@RasPi4-VNC:/opt/iobroker $ iob stop pi@RasPi4-VNC:/opt/iobroker $ iob restore 0 pi@RasPi4-VNC:/opt/iobroker $
-
@hg6806 Liegt denn überhaupt ein backup in /opt/iobroker/backups?
-
pi@RasPi4-VNC:/opt/iobroker/backups $ dir 2024_09_08-16_33_32_backupiobroker.tar.gz
-
-
pi@RasPi4-VNC:/opt/iobroker/backups $ ls -la /opt/iobroker/backups total 31312 drwxrwxr-x+ 2 iobroker iobroker 4096 Sep 27 21:10 . drwxrwsrwx+ 6 iobroker iobroker 4096 Sep 27 20:42 .. -rw-rw-r--+ 1 pi pi 32054686 Sep 27 21:10 2024_09_08-16_33_32_backupiobroker.tar.gz pi@RasPi4-VNC:/opt/iobroker/backups $
-
Der iobroker darf mit Dateien, die dem pi gehören nix anfangen.
chown iobroker:iobroker /opt/iobroker/backups/2024_09_08-16_33_32_backupiobroker.tar.gz
-
Verstehe ich leider alles nicht
pi@RasPi4-VNC:/opt/iobroker/backups $ chown iobroker:iobroker /opt/iobroker/backups/2024_09_08-16_33_32_backupiobroker.tar.gz chown: changing ownership of '/opt/iobroker/backups/2024_09_08-16_33_32_backupiobroker.tar.gz': Operation not permitted
-
@hg6806 sagte in Fehlermeldung beim Versuch ioBroker zu stoppen:
Operation not permitted
Dann per root command:
sudo chown iobroker:iobroker /opt/iobroker/backups/2024_09_08-16_33_32_backupiobroker.tar.gz