Closed boogerlad closed 9 years ago
Which terminal are you using?
I'm using terminator, but I'm getting this error with systemctl's timer on arch wiki.
I haven't tried using it with a systemctl timer running as root. I designed it to run as a normal user (ie cron). Can you set your timer to run as your user and see if that works?
uhoh I'm a bad person my user is root!
Please try version 2.27 with your systemd timer running as root. I am able to run as root with this code.
https://github.com/graysky2/modprobed-db/commit/d9ee195a724663e1cc9d15ab17095d9ca844667d
Note that I just released version 2.28 https://github.com/graysky2/modprobed-db/releases/tag/v2.28 which contains a proper timer/service. See the manpage.
Sorry I have been gone so long but I just tested this and it works perfectly now!!! Thank you!!
Hmm, I tried updating linux-ck with modprobed-db enabled in the pkgbuild and I got the "cannot determine your username so exiting" Inspecting the script, I see this
elif [[ "$SUDO_USER" = "root" ]]; then
mesg="Cannot determine your username so exiting."
echo -e "==> ERROR: ${mesg}" && exit 1
Is this an intentional thing to prevent running it as root?
However, systemctl status modprobed-db@root.service
shows no errors...
So you set the service to your user, not root? The database should be in your homedir then. Is it?
My user is root. The service is set to root. I am updating the linux-ck package with yaourt as root as well. I'm not sure where the database is located since I am not with the computer with Arch atm.
Have to revisit this. I never intended users to run it as root but the database should be in /root/.config/modprobed.*
if you're running it as root.
@boogerlad I cannot reproduce this. Even if I login as root I am able to store and recall as root without any errors. Can you confirm?
I can't reproduce either. Not enough time and no desktop. I will reopen when the time comes.
If I'm running as root,
USER
gets assigned toSUDO_USER
which is not defined. Then, I getError: Cannot figure out who ran this script. Bailing out
Butroot
ran the script! What's the problem? Why can't we just always use the value ofwhoami
?