Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unnecessarily using sudo when logging as root #1331

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

Open
duke-mai wants to merge 2 commits into amark:master
base: master
Choose a base branch
Loading
from duke-mai:patch-1

Conversation

Copy link

@duke-mai duke-mai commented May 29, 2023

No description provided.

Copy link
Owner

amark commented Jun 1, 2023

Will merge - tho willing to help me out? Is there a way to get this script to work in non-root shells? I don't want to assume I am/only root.

Copy link
Contributor

draeder commented Jun 1, 2023

#debian/ubuntu
if [ $(id -u) -ne 0 ]; then
 SUDO='sudo'
else
 SUDO=''
fi
${SUDO} apt-get install sudo -y
${SUDO} apt-get update -y
${SUDO} apt-get install curl git git-core screen -y
#fedora/openSUSE
${SUDO} yum check-update -y
${SUDO} yum install curl git git-core screen -y
duke-mai reacted with thumbs up emoji

Copy link
Author

Will merge - tho willing to help me out? Is there a way to get this script to work in non-root shells? I don't want to assume I am/only root.

Does the commit 67aad7e solve your problem? @amark

Copy link
Owner

amark commented Jul 19, 2023

Oh forgot about this. I need to test it against the various hosts but haven't had time. I'm really really really really dumb when it comes to CLI so I'm scared about stuff. I've gotten GUN to run on 0ドル.83/mo shared hosts. However, some more expensive ones (not listed) 2ドル/mo it won't let me install node or yum/apt-get, I'm not root, if I try to install NodeJS from scratch/make (not prebuilt) it takes hours & the hosts kills it. I think that machine/host I need to give up on, but I am trying to get it to work with most any shared/cpanel/would-be-PHP type hosts. Are the sudos necessary there? Or is apt-get/yum disallowed no matter what? Or?

Copy link
Contributor

mblaney commented Aug 8, 2023

It might be worth rethinking this, the README section in install.sh says: "Copy paste and run each line into your terminal.", and this change makes that a bit more complicated.

Maybe just a section before each os to simplify it?

# Log in as root if you need to install sudo
su -
apt-get install sudo -y
logout

Copy link
Owner

amark commented Aug 12, 2023

In README tho, most users are Mac/Windows no? apt-get doesn't work either those places.

draeder reacted with thumbs up emoji

Copy link
Contributor

mblaney commented Aug 25, 2023

yeah the README section mentions what to do on Windows though, so this is specifically aimed at Linux? I missed that you want people to be able to run this via curl -o- https://raw.githubusercontent.com/amark/gun/master/examples/install.sh | bash, it's probably safe to assume sudo is already installed so removing these two lines makes sense:

su -
apt-get install sudo -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /