I tweaked the config.ini with an appropritate user/hostname and set emonSD_pi_env=0. It mostly seemed happy apart from the Admin page saying: demandshaper Activating Auto-restart
After a quick look at the logs:
:~$ systemctl status demandshaper.service
● demandshaper.service - Emoncms Demandshaper service
Loaded: loaded (/lib/systemd/system/demandshaper.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/demandshaper.service.d
└─override.conf
Active: activating (auto-restart) (Result: exit-code) since Sun 2021-05-02 11:17:20 UTC; 3s ago
Docs: https://github.com/emoncms/demandshaper/blob/master/readme.md
Process: 5842 ExecStart=/usr/bin/php /opt/emoncms/modules/demandshaper/demandshaper_run.php (code=exited, status=217/USER)
Main PID: 5842 (code=exited, status=217/USER)
It’s trying to use the user ‘pi’ which doesn’t exist on my system.
If others need to fix this, try:
sudo systemctl edit demandshaper.service
Add the following to the file - I’d suggest using the user set in the config.ini:
Most of this info is spread across various other posts in the forum but I wanted to add a concise version so hopefully google will be able to find this in the future
Is it worth adding to the documentation or having the install scripts automatically create the override file? I’m not sure how popular the EmonScript install route is…