You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a more linux related question and I hope someone has an easy fix for me.
I would like to switch between grott (with growatt cloud) and grottsever via Home Assistant switch.
Therefor I created two shell scripts, which start/stop the service and server and copies the rigth grott.ini.
GrottServer Stop (Grott to cloud mode) sudo service grott stop cp grottgrowattserver.ini grott.ini sudo service grott start
and Grottserver Start (All data locally) sudo service grott stop cp grottgrottserver.ini grott.ini sudo service grott start python3 grottserver.py
That runs fine so far. I also can call this via ssh-command in Home assistant.
My Problem is that I can either start/stop the serviced via root (then withou sudo), which is not recommended.
or
I login with my user account, then I am asked for sudo password (Means script doesnt run through).
Any idea how the script shoul look like to make it stand alone?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I have a more linux related question and I hope someone has an easy fix for me.
I would like to switch between grott (with growatt cloud) and grottsever via Home Assistant switch.
Therefor I created two shell scripts, which start/stop the service and server and copies the rigth grott.ini.
GrottServer Stop (Grott to cloud mode)
sudo service grott stop cp grottgrowattserver.ini grott.ini sudo service grott start
and Grottserver Start (All data locally)
sudo service grott stop cp grottgrottserver.ini grott.ini sudo service grott start python3 grottserver.py
That runs fine so far. I also can call this via ssh-command in Home assistant.
My Problem is that I can either start/stop the serviced via root (then withou sudo), which is not recommended.
or
I login with my user account, then I am asked for sudo password (Means script doesnt run through).
Any idea how the script shoul look like to make it stand alone?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions