Sir hello , I made a custom command for viewing uptime on Linux server.
curl -Lso- https://mydomain/cmds/uptime.sh | bash
sir I want to know that how can I restrict this uptime.sh file by directly viewing or downloading but can download through only command ?
Like some one open https://mydomain/cmds/uptime.sh then their browser downloads uptime.sh file .
but I don't want that anyone can view or download file directly.
like if someone opens https://mydomain/cmds/uptime.sh then they will see access denied but if they run command curl -Lso- https://mydomain/cmds/uptime.sh | bash
Then they will get output.
Please tell.
curl -Lso- https://mydomain/cmds/uptime.sh | bash
sir I want to know that how can I restrict this uptime.sh file by directly viewing or downloading but can download through only command ?
Like some one open https://mydomain/cmds/uptime.sh then their browser downloads uptime.sh file .
but I don't want that anyone can view or download file directly.
like if someone opens https://mydomain/cmds/uptime.sh then they will see access denied but if they run command curl -Lso- https://mydomain/cmds/uptime.sh | bash
Then they will get output.
Please tell.
Last edited: