Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Fehlermeldung beim Versuch ioBroker zu stoppen

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Fehlermeldung beim Versuch ioBroker zu stoppen

    This topic has been deleted. Only users with topic management privileges can see it.
    • hg6806
      hg6806 Most Active last edited by

      Hallo zusammen,

      nach einer Neuinstallation von ioBroker auf einem RasPi4 wollte ich ein Backup restoren, doch beim Stoppen von ioBroker gab es folgende Fehlermeldung:

      pi@RasPi4-VNC:~ $ iobroker stop
      /usr/bin/iobroker: line 2: conditional binary operator expected
      /usr/bin/iobroker: line 2: syntax error near `*--allow-root*'
      /usr/bin/iobroker: line 2: `if [ "1000" = 0 ] && [[  != *--allow-root* ]]; then'
      
      Ro75 1 Reply Last reply Reply Quote 0
      • Ro75
        Ro75 @hg6806 last edited by

        @hg6806 vnc? Ordner usr/bin ? Was machst du da?

        Ro75

        hg6806 1 Reply Last reply Reply Quote 0
        • hg6806
          hg6806 Most Active @Ro75 last edited by

          @ro75

          Keine Ahnung, habe es ganz normal über folgenden Befehl installiert:

          curl -sLf https://iobroker.net/install.sh | bash -
          

          Wie immer eigentlich.

          Ro75 Thomas Braun 2 Replies Last reply Reply Quote 0
          • Ro75
            Ro75 @hg6806 last edited by

            @hg6806 wie immer? Was für ein System, Details bitte

            Ro75

            1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @hg6806 last edited by

              @hg6806

              Alles gut...

              cat /usr/bin/iobroker
              

              sagt?

              hg6806 1 Reply Last reply Reply Quote 0
              • hg6806
                hg6806 Most Active @Thomas Braun last edited by

                @thomas-braun

                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
                
                
                Thomas Braun 1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @hg6806 last edited by Thomas Braun

                  @hg6806

                  Änder mal die Zeile 3 ab:

                  if [ "$(id -u)" = 0 ] && [[ $* != *--allow-root* ]]; then
                  
                  hg6806 1 Reply Last reply Reply Quote 0
                  • hg6806
                    hg6806 Most Active @Thomas Braun last edited by

                    @thomas-braun

                    Wie und was denn ändern?
                    Und wieso habe ich jetzt hier überhaupt ein Problem?
                    Das hat doch sonst immer geklappt?

                    Thomas Braun 2 Replies Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @hg6806 last edited by

                      @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.

                      hg6806 1 Reply Last reply Reply Quote 0
                      • hg6806
                        hg6806 Most Active @Thomas Braun last edited by

                        @thomas-braun

                        Sorry, bin kein Linuxer. Nochmal die Frage wie ich was ändern soll. Welche Datei und wie?

                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @hg6806 last edited by

                          @hg6806

                          Alternativ kannst du auch die Zeilen 3-6 komplett löschen.

                          hg6806 1 Reply Last reply Reply Quote 0
                          • hg6806
                            hg6806 Most Active @Thomas Braun last edited by

                            @thomas-braun

                            Aus der Datei /usr/bin/bash oder wie?

                            1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @hg6806 last edited by Thomas Braun

                              @hg6806

                              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.

                              hg6806 1 Reply Last reply Reply Quote 0
                              • hg6806
                                hg6806 Most Active @Thomas Braun last edited by

                                @thomas-braun

                                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'
                                
                                
                                Thomas Braun 1 Reply Last reply Reply Quote 0
                                • Thomas Braun
                                  Thomas Braun Most Active @hg6806 last edited by

                                  @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 
                                  
                                  hg6806 1 Reply Last reply Reply Quote 0
                                  • hg6806
                                    hg6806 Most Active @Thomas Braun last edited by

                                    @thomas-braun

                                    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 $
                                    
                                    
                                    Thomas Braun 1 Reply Last reply Reply Quote 0
                                    • Thomas Braun
                                      Thomas Braun Most Active @hg6806 last edited by

                                      @hg6806

                                      Den user 'pi' hast du aus- und wieder eingeloggt?

                                      hg6806 1 Reply Last reply Reply Quote 0
                                      • hg6806
                                        hg6806 Most Active @Thomas Braun last edited by

                                        @thomas-braun

                                        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 $
                                        
                                        
                                        Thomas Braun 1 Reply Last reply Reply Quote 0
                                        • Thomas Braun
                                          Thomas Braun Most Active @hg6806 last edited by

                                          @hg6806 Liegt denn überhaupt ein backup in /opt/iobroker/backups?

                                          hg6806 1 Reply Last reply Reply Quote 0
                                          • hg6806
                                            hg6806 Most Active @Thomas Braun last edited by

                                            @thomas-braun

                                            pi@RasPi4-VNC:/opt/iobroker/backups $ dir
                                            2024_09_08-16_33_32_backupiobroker.tar.gz
                                            
                                            
                                            Thomas Braun 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            951
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            28
                                            729
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo