Exec Befehle hilfe

bash /data/evcc.sh

Die evcc.sh

#!/bin/bash

 sudo docker pull evcc/evcc:latest 
 sudo docker stop evcc
 sudo docker rm evcc
 cd /home/pi/smarthome
 sudo docker-compose up -d


Nodered Debug : /data/evcc.sh: line 3: sudo: command not found /data/evcc.sh: line 4: sudo: command not found /data/evcc.sh: line 5: sudo: command not found /data/evcc.sh: line 6: cd: /home/pi/smarthome: No such file or directory /data/evcc.sh: line 7: sudo: command not found

A bit more information might be necessary to get a helpful answer.
Are you trying to execute docker commands from inside a docker container (I assumed this because of /data path being used)?

Thx for answer. Yes Nodered Run in docker. /home/pi/smarthome/nodered

in Nodered is the pfad from Nodered = /data/

the Fiel evcc.sh is on /home/pi/smarthome/nodered/evcc.sh or in Nodered is it the pfad /data/evcc.sh

Ok, aber innerhalb vom Docker Container wird es nicht ohne weiteres möglich sein Docker zu steuern. Was genau ist das Ziel der Übung?
Wenn es nur darum geht den Container zu aktualisieren, gibt es bessere Wege, zum Beispiel watchtower.

Watch over updates alle Container ich möchte nur evcc updaten und das per Butten auf dem Dashboard

Honestly, I have difficulties to understand what you mean. I thought it would be easier in German...

A quick search gave me this link deployment - Automatically update Docker containers using webhooks - Server Fault where something called docker-image-puller is mentioned. Maybe you can add that to your node-red stack and trigger it via webhook.
Or you create a python script to update the image and restart the container directly. Source of this docker-image-puller might give you ideas.

In nodered there is the ecec node, you can feed it with commands, for example. sudo reboot ... this does not work . debug;object
Code: 127
Message: "Command failed: sudo reboot↵/bin/bash: line 1: sudo: command not found↵"

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.