Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Linux]Plik rc.local
Forum PHP.pl > Inne > Komputery i oprogramowanie
NorQ
Witam,

Mam serwer VPS z systemem Linux Debian 6.0 na którym zainstalowałem serwer gry SA:MP. Serwer gry działa rewelacyjnie, jednak problem w tym że po restarcie nocnym VPS'a muszę nad ranem od nowa uruchamiać serwer gry. Czytałem o tym i wiem że trzeba dodać plik uruchamiający serwer na listę /etc/rc.local . A problem w tym, że nie za bardzo wiem w jaki sposób to dopisać. Mógłbym prosić o przykład? Załóżmy że plik uruchamiający serwer to samp03svr i znajduje on się w katalogu /home/samp03/

A plik rc.local wygląda tak:
Cytat
#!/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.

exit 0



Dodam też pytanie: Czy screen będzie potrzebny, jeżeli system sam uruchamia serwer?
sazian
Kod
#!/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/samp03/samp03svr


exit 0
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.