q-m / questionmark-dash

[ARCHIVED] Statistics dashboard for Questionmark Foundation
http://www.thequestionmark.org/
MIT License
0 stars 0 forks source link

Switching consoles requires sudo #21

Closed martijnbleeker closed 6 years ago

martijnbleeker commented 7 years ago

@wvengen It looks like this will fix the standby issue for the dashboard.

wvengen commented 7 years ago

I propose to keep sudo away from the script, and run the script as root. sudo can break in a non-interactive console. We could check for id -u being zero and issue an error instead, if we're feeling zealous. In any case, what about running the cronjob as root?

martijnbleeker commented 7 years ago

Yes, the fix might be very specific for our config, since sudo doesn't (yet) ask for a password. I'm fine with running the cronjob from the root account. What we're trying to accomplish does sound a bit root-ish.

wvengen commented 7 years ago

This is already happening from /etc/crontab, and it runs as root. So the problem must be another.