Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [gelöst] Fehler bei reinstall.sh

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    [gelöst] Fehler bei reinstall.sh

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rewenode last edited by

      Hallo Forum,

      ich hab da grad einen Fehler, wo ich mir keinen Reim drauf machen kann;-(

      Ich will reinstall.sh ausführen

      root@iob:/opt/iobroker# 
      chmod +x reinstall.sh
      /bin/sh ./reinstall.sh
      
      

      Das reinstall.sh sieht erstmal korrekt aus (kommt aus einer frischen Installation):

      ! ````
      #!/bin/bash
      ! iobroker stop
      ! BASE=$(pwd)
      ! if [ ! -f "$BASE/iobroker" ]
      ! then
      ! echo "Script needs to be started in the iobroker base directory (normally /opt/iobroker on linux)"
      ! exit
      ! fi
      ! if [ -d ./node_modules ]
      ! then
      ! ls -1 ./node_modules | grep iobroker. > reinstall.list.txt
      ! chmod -R 777 *
      ! cd node_modules
      ! rm -R *
      ! pwd
      ! while read IN
      ! do
      ! npm install $IN --production --save --unsafe-perm --prefix $BASE
      ! if [ $? -eq 0 ]
      ! then
      ! echo "DONE $IN"
      ! else
      ! echo "FAIL $IN"
      ! fi
      ! done < "$BASE/reinstall.list.txt"
      ! chmod -R 777 *
      ! rm "$BASE/reinstall.list.txt"
      ! iobroker upload all
      ! fi

      
      Ich lass es mit /bin/sh laufen, weil ich im container nur sh habe.
      
      reinstall.list.txt erzeugt er noch.
      
      

      iobroker.admin
      iobroker.discovery
      iobroker.js-controller

      
      Dann listet er die iobroker -h auf. Also wenn iobroker mit fehlerhafter syntax aufgerufen wird. Und es kommt:
      
      

      ./reinstall.sh: 29: ./reinstall.sh: Syntax error: "done" unexpected (expecting "then")

      
      Da die echo's in der do-loop nicht kommen, geh ich mal davon aus, dass die nicht läuft. Nur warum?
      
      Gruß und schönen Sonntag
      1 Reply Last reply Reply Quote 0
      • R
        rewenode last edited by

        Ja wie auch immer. Das funkelnagelneue reinstall.sh aus ner frischen linux Installation ist wohl für Linux nicht zu gebrauchen;-) Hab's jetzt im Editor bearbeitet. Alle Leerzeilen raus, dann läuft es.

        1 Reply Last reply Reply Quote 0
        • apollon77
          apollon77 last edited by

          Mit js-Controller 1.5 wird das eh kein Shell Skript mehr sein …

          Gesendet vom Handy ...

          1 Reply Last reply Reply Quote 0
          • R
            rewenode last edited by

            Ja, hatte im git schon die reinstall.js gesehen, nur nix gefunden die auszulösen;-) Und ich werkel grad an einem Tut, da sollte das nachvollziehbar sein.

            Na jedenfalls erst mal gut!

            1 Reply Last reply Reply Quote 0
            • apollon77
              apollon77 last edited by

              Effektiv ist ein „npm rebuild“ als erster Versuch an sich das erste. Erst danach das reinstall

              Gesendet vom Handy …

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate

              528
              Online

              31.6k
              Users

              79.5k
              Topics

              1.3m
              Posts

              2
              5
              902
              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