----------------------------------
1 - How can I execute a program when Unix Sco reboot?
For example I have two script (two sockets) that I have to
start from 2 different users (root and toto).
I heard something about "etc/init.d" directory, but I don't know what to do next.
I put a script shell in which is starting a script but it doesn't work at all :
cd /mypath/myscript
I check rights on it, and even put "chmod 777" on it (in case...I will change it later)
----------------------------------
2 - How can I execute a command "init 6" from a C Unix script with "system" when this script hadn't been execute by root?
----------------------------------
Sorry for my approximative english and my light Unix knowledge...:rolleyes:
Thanks!
#
first I am also not an expert in SCO, have some years experince with sun en Hp unix as system admin.
#
Thanks for the tip about upstart, I normally use cron but i wanted something else this time and this should work
#
1)
You can use "sudo" if installed, you will have to allow users in the sudoers file. If you only want local users to execute this C script.
2)
You could enter a "su " change in you C script, if it is a complied C program, if it's a C-shell script i wouldn't do it like this.
3)
You could make your own shutdown script and then call this in your script.