Alternative software for Mecer UPS

rambo919

Honorary Master
Joined
Jul 30, 2008
Messages
11,971
OK I installed viewpower on my linux PC..... odd problem though.

It ONLY picks up my UPS when I start it as root, the autostart always starts it as user...... how do I make it autostart as root? Custom startup script and bypassing autostart?
 

rambo919

Honorary Master
Joined
Jul 30, 2008
Messages
11,971
Uninstalled, reinstalled to /root instead of /home. Then on startup it complains that I don't have the required permissions.

Changed in ./etc/profile.d/StartUPS.sh
#!/bin/sh
pids=$(netstat -ln | grep 51099 | awk '{print $6}')
pids=${pids%/*}
if [ -z "$pids" ]; then
/root/ViewPower/StartMain &
fi

By adding sudo at the start of the the "/" line and the warning goes away but it still does not actually start.

Is there a good way to solve this?
 

rambo919

Honorary Master
Joined
Jul 30, 2008
Messages
11,971
Sovled it, this morning a new message popped up that a password must be used but cant.... why it did not show yesterday I dunno.

Created a new file in /etc/sudoers.d called UPS with the following
ALL ALL = NOPASSWD:/root/ViewPower/StartMain

Now for the first time ViewPower both runs at startup and actually picks up me UPS.
 

wilbur4ce

Well-Known Member
Joined
Jul 23, 2012
Messages
237
Ek sit in die selfde boot as jy. Ons moet maar gaan met ViewPower vir nou.
Moes nou die aand 1h actually weer ViewPower probeer (vorige installation het ek somehow verkeerder drive heeltemal remove of die COM USB interface van die UPS geblock of breek... since then many moons and Windows installations later... Darem my peep afgekry vir ander se part so laat, ek moes nog bietjie komper
 
Top