graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
899 stars 84 forks source link

Use doas instead of sudo if it's installed #323

Closed frap129 closed 11 months ago

frap129 commented 2 years ago

I'm one of those weirdos that uses doas instead of sudo, and like issue #322 mentions, a symlink from doas to sudo usually makes most programs work but the special "-k" option used here breaks it. This PR adds proper support for using doas, automatically using it if it is installed.

mizzunet commented 2 years ago
󰅂 /usr/bin/profile-sync-daemon sync
/usr/bin/profile-sync-daemon: line 237: tmp_sudo: command not found

Also fails to sync and sync. I have OpenRC as init, that's why I'm calling it directly

mizzunet commented 2 years ago

I resolved that probelm by getting rid of tmp_sudo variable. And if ! $tmp_sudo psd-overlay-helper &>/dev/null; then to if ! $SUDO psd-overlay-helper &>/dev/null; then

frap129 commented 2 years ago
󰅂 /usr/bin/profile-sync-daemon sync
/usr/bin/profile-sync-daemon: line 237: tmp_sudo: command not found

Also fails to sync and sync. I have OpenRC as init, that's why I'm calling it directly

Are you using a shell that isn't bash? It works fine on my end, and the tmp_sudo variable is needed to preserve sudo's -kn argument for sudo users

mizzunet commented 2 years ago

Are you using a shell that isn't bash?

Right. I'm using fish

frap129 commented 2 years ago

Are you using a shell that isn't bash?

Right. I'm using fish

Do you have it symlinked in place of bash? The shebang at the top of this script explicitly calls bash, so don't try to interpret it with fish.

mizzunet commented 2 years ago

Do you have it symlinked in place of bash?

No.

The shebang at the top of this script explicitly calls bash,

Right. Not sure why it doesn't work.

Anyway, I'm using anything-sync-daemon for some reason.

StratusFearMe21 commented 11 months ago

You forgot to remove all the calls to sudo in psd-overlay-helper. That's why it's not working