I wrote a bash script for my use and it works. I want that script to be put in some server in my network and call that script in laptops / desktops in my network itself to execute. Any way I have made a way for that also as below.
Steps:
- Install Apache web server in local server.
- Put the script in web server.
- Make the script executable
chmod a+x
. - Open terminal in the client machine and install the package
curl
Now from the client terminal itself execute the command as:
sudo curl -kL http://serverip/script.sh | bash
It works fine but only problem is, in my script I have used User input commands like "read variable", that doesn’t work in this scenario. So how to do that is my problem.
Is there any way for me ?