Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/bin/bash
- SSHPASS='user'
- SSHHOST='192.168.1.20'
- SSHUSER='user'
- ssh -t $SSHUSER@$SSHHOST << EOF
- echo "Changing Directoy to Cloud"
- cd /home/user/cloudit_2/it_cloud
- git status
- sleep 3
- touch /tmp/abc.txt
- ls -lah /tmp
- rm -rf /tmp/abc.txt
- sudo -S service ssh restart
- $SSHPASS
- EOF
- <html>
- <h1>Deploy</h1>
- <form name="input" action="install.php">
- <input type="submit" value="Submit">
- </form>
- </html>
- <?php
- $output = shell_exec("/bin/sh a.sh");
- echo "<pre>$output</pre>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement