Start bash scriptu po starte
No potrebujem spustat isty bash script hned po starte systemu. Ale ten bash script potrebujem aby bezal na pozadi.
Podarilo sa mi to minule no teraz po reinstalacii systemu nemozem zanic na svete prist ako som to spravil. ano cital som ze mam pridat script do "/etc/rc.d/rc3.d/" . Ale ja nemam "/etc/rc.d" mam iba priamo "/etc/rc3.d" a podobne. Skusal som ho tam vlozit cez symbolicky odkaz ale nefungovalo to. Ties som vkladal symbolicky odkaz do "/etc/init.d/" ale neviem ci som ho spravne vlozil....
Minule sa mi to podarilo akosi zazracne, ze ak som zadal nazov scriptu v bashi spustil sa ihned. Plus som ho vpohode pridal do app "Aplikacie spustane pri starte", kde som pisal len nazov scriptu a spustal sa.
Je jedno ako sa to spravi ide len oto aby sa to spustalo po starte systemu a aby to bezalo na pozadi.
Je to script ktory kazdu hodinu povie kolko je aktualne hodin ( vravi len cele hodiny ). Takze sa tiez viaze na urcite audio stopy.
Dakujem za pomoc.
Pre pridávanie komentárov sa musíte prihlásiť.
nano /etc/rc.local
...
/cesta/subor.sh
...
exit 0
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/miro/SpeechTime/TimeSpeech.sh
exit 0
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/miro/SpeechTime/TimeSpeech.sh & #tu ti to bezi na pozadi
exit 0
2. spusti
sudo update-rc.d defaults TimeSpeech.sh
3. hotovo
miro@NB:~$ ps -e -F | grep TimeSpeech.sh
root 1583 1574 0 4486 1780 0 09:52 ? 00:00:00 /bin/bash /home/miro/SpeechTime/TimeSpeech.sh
miro@NB:~$ ps -e -F | grep TimeSpeech.sh
root 1105 1043 0 4494 1796 1 10:27 ? 00:00:00 /bin/bash /etc/rc2.d/S20TimeSpeech.sh start
a v zlozke /etc/rc2.d/ subor S20TimeSpeech.sh nejestvuje ako je mozne ze bezi ?
A este otazka bolo by to prilis neslusne a vulgarne odomna ak by som vlozil symbolicky odkaz do zlozky /bin/ na dany script ? a nasledne pridal spustac do app "Aplikacie spustane pri starte" ?
/home/miro/SpeechTime/TimeSpeech.sh
~/SpeechTime/TimeSpeech
kedy este nebola pripona .sh a nefungovalo to neviem preco.... Inac nieje to neako "neslusne" ak som ten script hodil do /bin ?