CJTripper 9 Posted April 11, 2021 Share Posted April 11, 2021 (edited) I was recently playing around with the ScripterX plugin and realized BASH wasn't installed on my Asustor 5304, it uses SH as it's default shell interpreter. Here are the steps I followed to install BASH and get it working with ScripterX /bin/bash selected as the in ScripterX interpreter: 1. Install Entware 1.0 from Asustor App Central 2. From SSH console session to the NAS: opkg update && opkg upgrade opkg install bash 3.cd /opt/bin sudo cp ./bash /bin/ Note that after a reboot of the NAS, you will have to repeat step 3 to recopy the bash file to the /bin folder ------------------ Update: Replace step 3 for a persistent solution (recreates symlink on startup): sudo echo /bin/ln -s /opt/bin/bash /bin/bash > /usr/local/etc/init.d/S76bash.sh Tested on an Asustor AS5304T, ADM ver 3.5.5.RFC3 Edited April 13, 2021 by CJTripper updated with persistent solution 1 1 Link to comment Share on other sites More sharing options...
Luke 38093 Posted April 12, 2021 Share Posted April 12, 2021 Hi, that's great info. Thanks for sharing. Link to comment Share on other sites More sharing options...
Jägs 75 Posted April 13, 2021 Share Posted April 13, 2021 Brilliant! I've been missing bash on my ASUSTOR... not anymore! Regarding step 3, I think if you copy it to "/usr/local/bin" instead of /bin—or create a symlink there—it should maintain its persistence after reboot. That's my theory, anyway. I'll give it a try and report back during my next reboot. Link to comment Share on other sites More sharing options...
CJTripper 9 Posted April 13, 2021 Author Share Posted April 13, 2021 Well, copying bash to "/usr/local/bin" kept the bash file there after reboot. Works great from SSH command line from any directory as "/usr/local/bin" is in the default environmental variable path. However it doesn't work for ScripterX - it seems to be hardcoded to the "/bin/bash" path and doesn't work with just having bash available via the environment path. So I cheated a bit and put a script in /usr/local/etc/init.d/ to create a symlink in /bin for bash. That init.d folder is where the Asustor App Central programs/services start from. Here is the syntax I used to create the simple script file from a SSH console: sudo echo /bin/ln -s /opt/bin/bash /bin/bash > /usr/local/etc/init.d/S76bash.sh It isn't pretty, but I have confirmed it is persistent and Scripter-X can now find it (via symlink) and is happy again. If you need it to load quicker on startup, decrease S76 to a lower number to increase priority. The S has to stay as the Asustor boot script calls all S* files in that init.d directory. Let me know if you come up with something better or more appropriate, I'm not a Linux guy and am just fumbling my way through. Thanks for the symlink suggestion, and motivating me to find a persistent solution. Link to comment Share on other sites More sharing options...
Jägs 75 Posted April 14, 2021 Share Posted April 14, 2021 On 4/13/2021 at 1:45 AM, CJTripper said: So I cheated a bit and put a script in /usr/local/etc/init.d/ to create a symlink in /bin for bash. That init.d folder is where the Asustor App Central programs/services start from. Here is the syntax I used to create the simple script file from a SSH console: sudo echo /bin/ln -s /opt/bin/bash /bin/bash > /usr/local/etc/init.d/S76bash.sh Yeah, that was going to be my next suggestion, so you were a step ahead of me! Glad you got it to work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now