@dashrender chocolatey can easily run as non-admin. The question is whether or not the application installs can handle that. Of course your centralized scrips for keeping things up-to-date would not get that use your space one you have to have a script to keep the user space chocolatey package up-to-date also
Yeah, I'll have to look at it - but only after someone else actually picks ownership of the package back up. The current maintainer has stated he's no longer maintaining it.
Well first off you had /root/opt/scripts not /opt/scripts. Second you either have to log out and back in or tell your user to use the new path with something like
source ~/.bash_profile
I used ````~/opt/scripts``` initially, as I wasn't aware of just adding my scripts into one of the existing locations. (everything said just add a new directory).
By simply moving the script into an already existing path, I am able to update with just "script.sh".
When you are root and your home is /root and you put ~/opt/scripts that is /root/opt/scripts.
Remember that ~ is a shortcut to your home directory, which is /root
So by adding ```/opt/scripts/```` this would've worked, but would've added complexity for no reason.
No that still isn’t a default location. In the OP you said you put the script in /opt/scripts. Where did you actually put it?
Originally I created the directory /opt/scripts and put the script in there so the Directory looks like
/opt/scripts/script.sh
I went back and change the script location to be in /usr/local/bin
This now works without issue, and /opt/scripts no longer exists.
Ok ya that’s where the problem was. /opt/scripts is different than /root/opt/scripts. If you would have had that in your .bashrc or .bash_profile (or whichever shellconfigure you’re using) it would have worked. But you still have to let the user know of the PATH change.
I'm the user in this case, but I never really create / save my own scripts. I just got tired of running a set of commands, every other day.
Thus the need to figure out how I could run the script, without having to jump into the exact directory from which the script was saved.
I mean you have to let the user you are logged in as Know if the change. Either by logging out and back in or by temporarily sourcing the config.
I've logged out, what do you mean "sourcing the config" ?
If you change your PATH while you’re logged on the user account doesn’t know of that change. You have to either log out and log in again or temporarily do something like
If you aren't putting this out on a blog somewhere you're probably losing some valuable publicity. These are good scripts that people would love to be able to find.