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.
- Install Apache web server in local server.
- Put the script in web server.
- Make the script executable
- Open terminal in the client machine and install the package
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 ?