General TC > Programming & Scripting - Unofficial
startup script
chilly:
Hi all,
i am a noobe and using TC for past 3 days.
I have an issue in setting up the start-up script. I need to run a script that contains "java -jar ..etc". (I have JRE installed and can run the script manually)
I tried to link the script to start-up in 2 ways,
1. I added the call to script in /opt/bootlocal.sh
./home/tc/app/myscript
but this gives an error stating JAVA not found. so i thought this script is initialized even before java loaded
2. Adding a flag file /usr/local/tce.installed/myscript
content of myscript:
#/bin/sh
./home/tc/app/myscript
but i dont know why, the second one also fails without any log. could some one help me in fixing my start-up scripts.
Thanks
bmarkus:
Try to remove the leading . in ./home/...
malikawan:
first u add java path to ur run java then ur jar file path
e.g
u install java in home/tc and ur jar file is in tc folder then
/home/tc/jdk1.7.0_07/bin/java -jar /home/tc/filename.jar
plz change the jdk1.0.0_07 to which version u installed
copy this line amend the path and filename and save as filename.sh
then give this file to execute permission and place at home/tc/.X.D
its start on boot every time.
Please give me feed back its work or not
Malik Awan
chilly:
Thanks Markus and Malik.
@Markus : i tried removing leading '.' but it remains the same. it didnt fixed my issue
@Malik : your soln works. but still I prefer the script to run once all scripts have been executed, rather than exporting the java path..as it will set by the scripts that will be executed later
malikawan:
--- Quote from: chilly on January 10, 2014, 02:13:45 AM ---Thanks Markus and Malik.
@Markus : i tried removing leading '.' but it remains the same. it didnt fixed my issue
@Malik : your soln works. but still I prefer the script to run once all scripts have been executed, rather than exporting the java path..as it will set by the scripts that will be executed later
--- End quote ---
ok chilly link ""than copy this line to /home/tc/.profile open with editor
then at the end after fi and before /etc/sysconfig/Xserver paste this line
PATH=$PATH:/home/tc/jdk1.0.0_07/bin/
export PATH
plz give me feed back
Navigation
[0] Message Index
[#] Next page
Go to full version