Skip to content

feat: add doas support #4531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add doas support
Some people may have some reason to drop sudo and switch to doas
  • Loading branch information
unknowndevQwQ authored Oct 13, 2022
commit 26710df6c6ab6c261876c7029cec8d76596a05dd
4 changes: 3 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ sh_c() {
sudo_sh_c() {
if [ "$(id -u)" = 0 ]; then
sh_c "$@"
elif command_exists doas; then
sh_c "doas $*"
elif command_exists sudo; then
sh_c "sudo $*"
elif command_exists su; then
Expand All @@ -539,7 +541,7 @@ sudo_sh_c() {
echoh
echoerr "This script needs to run the following command as root."
echoerr " $*"
echoerr "Please install sudo or su."
echoerr "Please install doas, sudo or su."
exit 1
fi
}
Expand Down