hyuuga Posted July 29, 2010 Share Posted July 29, 2010 hola i need some guide.. how can i auto start up heritrix? last time i'm using this bash scrip to start up the heritrix by click the button.. and it's works but now i want to au to startup heritrix whithout click the button... i want o open it directly from the browser #!/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 thank you.. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/ Share on other sites More sharing options...
trq Posted July 29, 2010 Share Posted July 29, 2010 i want o open it directly from the browser What exactly do you mean by that? You want to execute this script when a web page loads? Surely you can modify the script you have already? Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092485 Share on other sites More sharing options...
hyuuga Posted July 29, 2010 Author Share Posted July 29, 2010 thanks for your reply.. 1. i have to open the heritrix console via my webpage and it is successfull when i click button "here" to open the heritrix.sh and heritrix console can be run... fyi button "heritrix console" is link to http://localhost:9090 but before that it has to open with heritrix.sh. 2. The problem is when i restart the pc, i have to click "here" to download and open with heritrix.sh. what i want is.. after i restart or reboot my pc i can directly access heritrix console wihtout click the "here" button. i want that i can directly open by typing http:// localhost:9090 at web browser and it can automatically go to heritrix console Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092491 Share on other sites More sharing options...
trq Posted July 29, 2010 Share Posted July 29, 2010 Still not sure what your rambling about. Your posts don't make a great deal of sense. Anyway, if you want to start a service when Linux boots, you either need to write a startup script (see the working examples within /etc/init.d)or add it to /etc/rc.local if it exists. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092494 Share on other sites More sharing options...
hyuuga Posted July 29, 2010 Author Share Posted July 29, 2010 hi thanks for the reply i appreciate it! here what i have done.. 1.) i add the command to a bash script #!/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 2. and save the file and roots owns it and has execute permission: chown root:root: heritrix.sh chmod 755 heritrix.sh 3. copy the file to /etc/init.d/ cp heritrix.sh /etc/init.d chkconfig -- add heritrix.sh chkconfig heritrix.sh on and i reboot my pc, i found out that i not able access to the desktop. can you please guide me step-by-step? appreciate your guidance and help. looking forward to hear from you.. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092500 Share on other sites More sharing options...
trq Posted July 29, 2010 Share Posted July 29, 2010 The simplest way to do this is to add your script to the /etc/rc.local file. Startup scripts within /etc/init.d/ require the functions start(), stop() and restart() at minimum. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092510 Share on other sites More sharing options...
hyuuga Posted July 30, 2010 Author Share Posted July 30, 2010 hello thanks for your reply... 1.how to start up scripts within /etc/init.d/ require the functions start(), stop() and restart() at minimum? 2. is there any code beside the bash script? 3.can you guide me step by step? thanks again for helping me... i really appreacite it.. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092877 Share on other sites More sharing options...
trq Posted July 30, 2010 Share Posted July 30, 2010 1) As I said already. have a look at the existing scripts within /etc/init.d/. However, for something this simple, you don't really need it. 2) Linux systems rely heavily on Bash. 3) Copy your existing script into the /etc/rc.local file. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092886 Share on other sites More sharing options...
hyuuga Posted July 30, 2010 Author Share Posted July 30, 2010 thanks you again for your reply... i already copy the bash script into the /etc/rc.local file. when i reboot my pc, i found out that i not able access to the desktop. appreciate your guidance and help. looking forward to hear from you.. from nisa.. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092901 Share on other sites More sharing options...
trq Posted July 30, 2010 Share Posted July 30, 2010 thanks you again for your reply... i already copy the bash script into the /etc/rc.local file. when i reboot my pc, i found out that i not able access to the desktop. appreciate your guidance and help. looking forward to hear from you.. from nisa.. Did you remove the broken script that you made within /etc/init.d ? Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092904 Share on other sites More sharing options...
hyuuga Posted July 30, 2010 Author Share Posted July 30, 2010 i already remove the bash script from the etc/init.d and i copy the script to the rc.local file but i still cannot access my desktop... thank you for ur reply.. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092939 Share on other sites More sharing options...
trq Posted July 30, 2010 Share Posted July 30, 2010 Do you have a graphical login or do you get a terminal prompt? What distro are you using? Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092942 Share on other sites More sharing options...
hyuuga Posted July 30, 2010 Author Share Posted July 30, 2010 wow.. thanks fast your prompt reply. I allocate the bash coding into the rc.local then i reboot it then I cant login to my desktop, It just shows the blank page, so now I need to use a LIVE CD to login and delete the coding tht I placed in the rc.local. Please advice... thanks a lot :-) Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092943 Share on other sites More sharing options...
trq Posted July 30, 2010 Share Posted July 30, 2010 re-read my last reply. Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092956 Share on other sites More sharing options...
hyuuga Posted July 30, 2010 Author Share Posted July 30, 2010 yes. I have graphical login and when right clcik the mouse I can have terminal prompt as well. But now tht the problem is when I locate the bash code in rc.local and after reboot, it will lead me to the blank desktop. can u please help me. please.... thanks a lot :-) Quote Link to comment https://forums.phpfreaks.com/topic/209197-auto-start-up-heritrix/#findComment-1092994 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.