Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst] Debian Autostart will nicht - kein SUDO

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] Debian Autostart will nicht - kein SUDO

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

      Hast du mal in regel 65 und 67 geschaut welchen pfad er nicht findet und ob er bereit das ist?

      –-----------------------

      Send from mobile device

      1 Reply Last reply Reply Quote 0
      • kmxak
        kmxak Most Active last edited by

        was meinst du genau?

        Im Install Script steht````

        Start the service!

        echo "Start iobroker..."
        cd @@PATH@@ ## Zeile 65
        #chmod 777 * -R
        ./iobroker start ## Zeile 67
        echo "call http://ip_address:8081/ in browser to get the AdminUI of ioBroker"

        
        ich muss nach jeden reboot iobroker per hand starten
        1 Reply Last reply Reply Quote 0
        • Dutchman
          Dutchman Developer Most Active Administrators last edited by

          @kmxak:

          was meinst du genau?

          Im Install Script steht````

          Start the service!

          echo "Start iobroker..."
          cd @@PATH@@ ## Zeile 65
          #chmod 777 * -R
          ./iobroker start ## Zeile 67
          echo "call http://ip_address:8081/ in browser to get the AdminUI of ioBroker"

          
          ich muss nach jeden reboot iobroker per hand starten `  
          

          ?

          im "/opt/iobroker/node_modules/iobroker/install/linux/install.sh" ?

          bei mir steht da:

          #!/bin/bash
          #Create empty directories
          IO_USER=$USER
          NODE=`which node`
          #Create user if first install
          #if [ ! -f "/opt/iobroker/conf/iobroker.json" ]; then
          #    if [ $(cat /etc/passwd | grep "/home" |cut -d: -f1 | grep '^iobroker/r> | wc -l) -eq 0 ]
          #    then
          #        read -p "Use current user '$USER' for iobroker? If not, the 'iobroker' user will be created.! [Y/n]" yn
          #        case $yn in
          #            [Nn]* ) echo "Create user iobroker ...";
          #                    apt-get install sudo;
          #                    useradd iobroker;
          #                    adduser iobroker sudo;
          #                    IO_USER=iobroker;
          #                    break;;
          #            [Yy]* ) echo "Use user '$USER' for iobroker.";;
          #            * ) echo "Use user $USER for iobroker.";;
          #        esac
          #    else
          #        IO_USER=iobroker
          #    fi
          #else
              if [ $(cat /etc/passwd | grep "/home" |cut -d: -f1 | grep '^iobroker/r> | wc -l) -eq 0 ]
              then
                  IO_USER=$USER
              else
                  IO_USER=iobroker
              fi
              echo "Use user $IO_USER for install."
          #fi
          
          #Modify /etc/couchdb/local.ini. Replace ";bind_address = 127.0.0.1" with "bind_address = 0.0.0.0"
          #if grep -Fq ";bind_address = 127.0.0.1" /etc/couchdb/local.ini; then
          #    sed -i -e 's/;bind_address = 127\.0\.0\.1/bind_address = 0.0.0.0/g' /etc/couchdb/local.ini
          #    /usr/bin/couchdb -d
          #    /usr/bin/couchdb -b
          #fi
          
          ## if iobroker.sh not exists. Copy it
          if [ ! -f "/etc/init.d/iobroker.sh" ]; then
              cp /opt/iobroker/node_modules/iobroker.js-controller/../iobroker/install/linux/iobroker.sh /etc/init.d/iobroker.sh
          
          
          1 Reply Last reply Reply Quote 0
          • kmxak
            kmxak Most Active last edited by

            das problem scheint aber nicht an der install.sh zu liegen. die datei im init.d wurde ja erstellt. auch funktionieren tut sie ja aber irgendwas passt da beim neustart nicht.

            Gibt es eine möglichkeit das zu loggen oder so?

            1 Reply Last reply Reply Quote 0
            • K
              knopers1 last edited by

              zeigt doch mal den Inhalt der init.d, hatte nach dem Update dort auch Autostart wieder repariert…

              1 Reply Last reply Reply Quote 0
              • kmxak
                kmxak Most Active last edited by

                was genau möchtest du denn sehen?

                1 Reply Last reply Reply Quote 0
                • kmxak
                  kmxak Most Active last edited by

                  Hat sich erledigt.

                  DEBIAN installiert kein sudo bei der Installation!

                  https://www.privateinternetaccess.com/f … by-default

                  So ging es

                  1 Reply Last reply Reply Quote 0
                  • S
                    samsungfreak last edited by

                    @kmxak:

                    Hat sich erledigt.

                    DEBIAN installiert kein sudo bei der Installation!

                    https://www.privateinternetaccess.com/f … by-default

                    So ging es `

                    Danke dir!

                    Da ich alles mit dem root User ausführe musste ich nur sudo nachinstallieren 🙂

                    1 Reply Last reply Reply Quote 0
                    • P
                      ple last edited by

                      ich führe auch alles mit dem root User aus, nur leider klappt der Autostart und debian 9 leider nicht.

                      Sudo hatte ich als erstes nachinstalliert.

                      Hast du noch eine Idee was ich machen könnte, damit der Autostart wieder läuft?

                      Gruß

                      1 Reply Last reply Reply Quote 0
                      • N
                        nordi last edited by

                        :idea: Nach langem probieren, hier meine funktionierende Autostartlösung mit system.d unter Debian 9:

                        sudo nano /lib/systemd/system/iobroker.service
                        

                        /lib/systemd/system/iobroker.service

                        
                            [Unit]
                            Description=iobroker daemon
                            After=network.target
                        
                            [Service]
                            Type=forking
                            ExecStart=/usr/bin/node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js start
                            User=root
                            PIDFile=/opt/iobroker/node_modules/iobroker.js-controller/lib/iobroker.pid
                            Restart=on-abort
                        
                            [Install]
                            WantedBy=default.target
                        
                        

                        Der so vorbereitete Dienst kann über den systemctl Befehl gestartet werden.

                        sudo systemctl start iobroker.service
                        
                        systemctl daemon-reload
                        

                        Wenn alles ok ist, kann der Autostart aktiviert werden:

                        sudo systemctl enable iobroker.service
                        

                        Bei Systemstart wird nun iobroker automatisch gestartet.

                        Um den Dienst wieder auszuschalten und den Neustart bei Systemstart zu verhindern nutzt man:

                        sudo systemctl disable iobroker.service
                        

                        Um zu sehen, ob iobroker läuft, genügt ein

                        sudo systemctl status iobroker.service
                        

                        Läuft es noch nicht und man möchte sozusagen manuell starten reicht ein:

                        sudo systemctl start iobroker.service
                        

                        Ein Neustart von iobroker würde mit

                        sudo systemctl restart iobroker.service
                        

                        funktionieren, ein Stop von iobroker entsprechend

                        sudo systemctl stop iobroker.service
                        

                        Gruß Nordi

                        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

                        850
                        Online

                        31.7k
                        Users

                        79.8k
                        Topics

                        1.3m
                        Posts

                        8
                        14
                        5004
                        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