Autostart skryptu przy starcie

Tematy związane z oprogramowaniem, instalacją, konfiguracją
batonik
Posty: 7
Rejestracja: 31 maja 2009, 19:01

Autostart skryptu przy starcie

Post autor: batonik »

Witam.
Posiadam Debiana Lenny 5.1, mam następujący problem, nie odtwarza mi skryptu.

Co robię nie tak: w root/
hlds_start (bez rozszerzenia) a w nim:

Kod: Zaznacz cały

#!/bin/bash
# Serwer s1
cd /home/serwery/ffa
screen -dmS FFA ./hlds_run -game cstrike +port 27016 +maxplayers 11 +exec server.cfg +map de_dust2
w /etc/rc.local

Kod: Zaznacz cały

#!/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.
sh /root/hlds_start 
exit 0
Serwer mam w katalogu:
home/serwery/ffa.

Próbowałem użyć update-rc.d. ale są kolejne błędy. Otóż wrzuciłem skrypt do /etc/init.d o nazwie hlds nadałem prawa dostępu 755,

Kod: Zaznacz cały

vz2959:~# update-rc.d hlds1 defaults
update-rc.d: warning: /etc/init.d/hlds1 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/hlds1 ...
   /etc/rc0.d/K20hlds1 -> ../init.d/hlds1
   /etc/rc1.d/K20hlds1 -> ../init.d/hlds1
   /etc/rc6.d/K20hlds1 -> ../init.d/hlds1
   /etc/rc2.d/S20hlds1 -> ../init.d/hlds1
   /etc/rc3.d/S20hlds1 -> ../init.d/hlds1
   /etc/rc4.d/S20hlds1 -> ../init.d/hlds1
   /etc/rc5.d/S20hlds1 -> ../init.d/hlds1
vz2959:~# update-rc.d hlds1 start 20 2 3 4 5 .
update-rc.d: warning: /etc/init.d/hlds1 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 System startup links for /etc/init.d/hlds1 already exist.
A w pliku hlds1:

Kod: Zaznacz cały

#!/bin/bash
# Serwer s1
cd /home/serwery/ffa
screen -dmS FFA ./hlds_run -game cstrike +port 27016 +maxplayers 11 +exec server.cfg +map de_dust2
Wiem, że nakombinowałem ale człowiek uczy się na błędach no ale cóż w tym coś nie wychodzi.
Co zrobić by uruchamiane były procesy przez rc.local lub jak skonfigurować update-rc.d?
ODPOWIEDZ