Read the statement by Michael Teeuw here.
updated installer script available for testing
-
-
@sdetweil I already went through the installation procedure to get pm2 installed. That required the npm command to install pm2.
After the initial script run,
pm2 start MagicMirror
returned a “bash: pm2: command not found” error. Once I got pm2 installed, getting the script monitored by pm2 was easy enough. At a guess, it’s a problem with using sudo to install pm2, but I’m afraid I don’t have the exact error message. -
@bhepler what did u have to do for the pm2 install?
-
@sdetweil - I pulled this from the official GitHub page:
sudo npm install -g pm2
. Once I ran that, I just changed to the~/MagicMirrors/installers
folder and told pm2 to run/maintain it:pm2 start mm.sh
-
@bhepler weird… that is that the script does between the two log entries
echo pm2 not installed, installing >>$logfile result=$(npm install $up -g pm2) echo pm2 install result $result >>$logfile
$up is for the mac
bet it needed sudo…
-
I also added to catch the stderr output to the log too
echo pm2 not installed, installing >>$logfile result=$(sudo npm install $up -g pm2 2>&1) echo pm2 install result $result >>$logfile
-
@bhepler could you retest the installer? just rename your current MagicMirror folder out of the way… thanks
course u have pm2 already … never mind
-
@sdetweil - No worries. I have a spare Pi and a SD card I can use. I’ll get it cranked out tonight. I’ll get you that info.
-
@bhepler thanks… i got some new sd cards today, so I will test too.
-
@sdetweil - Brand new Buster installation on a RPi 3B+. Installation script worked as expected.
I had trouble with pm2 on my existing mirror too. I ended up upgrading to the latest pm2 in order to get it to remember to start on boot.
At this point, I think your script is handling it properly. Thanks for the quick replies!