hyuuga Posted July 23, 2010 Share Posted July 23, 2010 i need to start up the herirtrix tools by type bash heritrix.sh in open terminal. how to execute this command without opening the open terminal. i want to make a button in webpage that can execute this function. so that everytime i want to start up heritrix, i just click the run button and no need to open the terminal.. thank you.. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/ Share on other sites More sharing options...
trq Posted July 23, 2010 Share Posted July 23, 2010 exec Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1089897 Share on other sites More sharing options...
hyuuga Posted July 23, 2010 Author Share Posted July 23, 2010 is it correct.. i need some guide... this is the code that i got from the last post. thank you. <?php session_start();?> if ($_POST['here']) { file_exists("/root/bash/heritrix.sh") echo "File exists and ready to execute."; } else { echo "Wooops! File is missing."; } if { is_executable("/root/heritrix.sh") echo "And File is executable" exec ("/root/heritrix.sh", &$output); } else { echo "File is not executable."; } Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1089900 Share on other sites More sharing options...
trq Posted July 23, 2010 Share Posted July 23, 2010 That should do it providing the correct permissions are set. remember the script will execute as your Apache user. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1089904 Share on other sites More sharing options...
hyuuga Posted July 23, 2010 Author Share Posted July 23, 2010 1.where should i put the code 2.how to run it? 3.How is it relate with apache? sorry, i am newbie on ths, please guide me step-by-step appreciate all your answer & guidiance. thanks in advance, Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1089908 Share on other sites More sharing options...
trq Posted July 23, 2010 Share Posted July 23, 2010 1. In a web page, along with your form and button called 'here'. 2. Push the button. 3. Apache is a web server. You need a web server to be able to make web pages with php. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1089922 Share on other sites More sharing options...
hyuuga Posted July 26, 2010 Author Share Posted July 26, 2010 how to use apache? how to run it? can you please guide me how to use apache? thank a lot.. for ur info i'm using xampp.. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1091149 Share on other sites More sharing options...
trq Posted July 26, 2010 Share Posted July 26, 2010 Apache is part of xampp. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1091152 Share on other sites More sharing options...
hyuuga Posted July 29, 2010 Author Share Posted July 29, 2010 hola thanks a lot.. now i can open the heritrix console by click the button to open the application by using bash command #!/bin/bash # #chkconfig:345 99 99 #Description:Script to change /dev/random export HERITRIX_HOME=/root/heritrix-1.14.3 cd $HERITRIX_HOME $HERITRIX_HOME/bin/heritrix --admin=LOGIN:PASSWORD --port=9090 now i want to do that the heritrix console can be startup automatically. wihout click the button... Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1092419 Share on other sites More sharing options...
hyuuga Posted July 29, 2010 Author Share Posted July 29, 2010 do you have any idea how to do that? fyi i'm using linux.. Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1092420 Share on other sites More sharing options...
trq Posted July 29, 2010 Share Posted July 29, 2010 You'll need to write a start-up script if one doesn't already exist. See actual examples within /etc/init.d. ps: This is no longer a php question (we have a Linux board). Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1092452 Share on other sites More sharing options...
hyuuga Posted July 29, 2010 Author Share Posted July 29, 2010 thank you very much... Quote Link to comment https://forums.phpfreaks.com/topic/208611-auto-start-up-heritrix/#findComment-1092478 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.