copy that script to the /etc/init.d directory.
You can simply add the lines below to the "local" startup file.
Ubuntu startup:
vi /usr/local/bin/starttng
add the following to the file starttng:
- Code: Select all
#!/bin/bash
cd /opt/datatex/tng
./tng -D
Once done wq.
- Code: Select all
chmod +x starttng
Now edit rc.local
vi /etc/rc.local
add
- Code: Select all
/usr/local/bin/starttng
Then run the following commands:
ln -s /etc/init.d/tngscript /etc/rc0.d/K61tng
ln -s /etc/init.d/tngscript /etc/rc2.d/K60tng
ln -s /etc/init.d/tngscript /etc/rc2.d/S90tng
ln -s /etc/init.d/tngscript /etc/rc3.d/K61tng
ln -s /etc/init.d/tngscript /etc/rc3.d/S90tng
ln -s /etc/init.d/tngscript /etc/rc4.d/S90tng
ln -s /etc/init.d/tngscript /etc/rc5.d/S90tng
ln -s /etc/init.d/tngscript /etc/rc6.d/K61tng