Linux Autostart

»

» tobi

Gast
Hi

ich hab seid gut ner Woche meinen LAN Server zusammengebaut und mit Linux SuSE 9.3 am laufen. Jetzt hab ich nen HLDS und noch nen paar andere Dinge auf diesem Installiert und will diese beim starten von Linux mit ausführen lassen. Wo muss ich das eintragen und wie?
Kann ich darüber hinaus auch sachen aus dem Autostart nehmen, die unnötig sind? Der Server sollte halt nur den HLDS ausführen, nen TS2 Server und das wars... Kein MySQL oder Apache (sehe solche einträge beim starten, keine ahnung warum der die lädt). Naja der Samba sollte auch laufen :D

MfG

» tobi
 
Gehst in /etc/init.d/
da stehen alle autostart einträge drin.
Wenn du HLDS starten willst, musst du halt ein Script schreiben, das HLDS startet. Wenn du das geschrieben hast, machst du rc-update add hlsd_script default
Wenn du einen Eintrag aus dem Autostart rausnehmen willst, machst du rc-update del script_name
 
Harrold schrieb:
Gehst in /etc/init.d/
da stehen alle autostart einträge drin.
Wenn du HLDS starten willst, musst du halt ein Script schreiben, das HLDS startet. Wenn du das geschrieben hast, machst du rc-update add hlsd_script default
Wenn du einen Eintrag aus dem Autostart rausnehmen willst, machst du rc-update del script_name
das rc-update default geht imho nur bei gentoo ;)

bei suse kannste alle dienste per yast rausnehmen, da gibts irgendwo nen editor drin.
desweiteren kannste dir ne datei anlegen in der du alle befehle reinschreibst die ausgeführt werden sollen.
diese legst du dann zu den initscripten:
Code:
#!/bin/bash
start() {
befehl eins
befehl zwei
etc
}
stop() {
was soll er beim beenden ausführen? oder stoppen?
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
 *)
        echo $"Usage: $prog {start|stop|restart|status|condrestart}"
        exit 1
esac

exit $RETVAL

das funktioniert so hoffentlich
 
Zuletzt bearbeitet:
Also im Moment sagt mir der Server per SSH folgendes beim Befehl "ps uax"

fallen-soulz:~ # ps uax
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 596 236 ? S Jul14 0:00 init [3]
root 2 0.0 0.0 0 0 ? S Jul14 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN Jul14 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S Jul14 0:00 [migration/1]
root 5 0.0 0.0 0 0 ? SN Jul14 0:00 [ksoftirqd/1]
root 6 0.0 0.0 0 0 ? S< Jul14 0:00 [events/0]
root 7 0.0 0.0 0 0 ? S< Jul14 0:00 [events/1]
root 8 0.0 0.0 0 0 ? S< Jul14 0:00 [khelper]
root 9 0.0 0.0 0 0 ? S< Jul14 0:00 [netlink/0]
root 10 0.0 0.0 0 0 ? S< Jul14 0:00 [netlink/1]
root 11 0.0 0.0 0 0 ? S< Jul14 0:00 [kblockd/0]
root 12 0.0 0.0 0 0 ? S< Jul14 0:00 [kblockd/1]
root 44 0.0 0.0 0 0 ? S Jul14 0:00 [pdflush]
root 43 0.0 0.0 0 0 ? S Jul14 0:00 [kirqd]
root 45 0.0 0.0 0 0 ? S Jul14 0:00 [pdflush]
root 47 0.0 0.0 0 0 ? S< Jul14 0:00 [aio/0]
root 46 0.0 0.0 0 0 ? S Jul14 0:00 [kswapd0]
root 48 0.0 0.0 0 0 ? S< Jul14 0:00 [aio/1]
root 630 0.0 0.0 0 0 ? S Jul14 0:00 [kseriod]
root 1395 0.0 0.0 0 0 ? S< Jul14 0:00 [ata/0]
root 1396 0.0 0.0 0 0 ? S< Jul14 0:00 [ata/1]
root 1398 0.0 0.0 0 0 ? S Jul14 0:00 [scsi_eh_0]
root 1399 0.0 0.0 0 0 ? S Jul14 0:00 [scsi_eh_1]
root 1544 0.0 0.0 0 0 ? S Jul14 0:06 [kjournald]
root 2132 0.0 0.0 0 0 ? S Jul14 0:00 [khubd]
root 2180 0.0 0.0 1360 308 ? S<s Jul14 0:00 udevd
root 2478 0.0 0.0 1436 440 ? S< Jul14 0:00 [hwscand]
root 3579 0.0 0.0 1552 708 ? Ss Jul14 0:00 /sbin/syslogd -a /var/lib/named/dev/log -a /var/lib/ntp/dev/log
root 3638 0.0 0.0 1524 584 ? Ss Jul14 0:00 /sbin/klogd -c 1 -2 -x
root 3682 0.0 0.1 4704 1288 ? Ss Jul14 0:00 /usr/sbin/saslauthd -a pam
root 3683 0.0 0.1 4704 1288 ? S Jul14 0:00 /usr/sbin/saslauthd -a pam
root 3684 0.0 0.1 4704 1288 ? S Jul14 0:00 /usr/sbin/saslauthd -a pam
root 3685 0.0 0.1 4704 1288 ? S Jul14 0:00 /usr/sbin/saslauthd -a pam
root 3686 0.0 0.1 4704 1288 ? S Jul14 0:00 /usr/sbin/saslauthd -a pam
root 3696 0.0 0.0 1412 484 ? Ss Jul14 0:00 /sbin/resmgrd
root 3717 0.0 0.0 2072 900 ? Ss Jul14 0:00 /usr/sbin/xinetd
root 3742 0.0 0.1 5148 1996 ? Ss Jul14 0:02 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root 3859 0.0 0.0 43092 848 ? Ssl Jul14 0:00 /usr/sbin/nscd
root 3903 0.0 0.0 1668 608 ? Ss Jul14 0:00 /usr/sbin/cron
root 3907 0.0 0.0 1824 620 tty1 Ss+ Jul14 0:00 /sbin/mingetty --noclear tty1
root 3908 0.0 0.0 1824 620 tty2 Ss+ Jul14 0:00 /sbin/mingetty tty2
root 3909 0.0 0.0 1824 620 tty3 Ss+ Jul14 0:00 /sbin/mingetty tty3
root 3910 0.0 0.0 1824 620 tty4 Ss+ Jul14 0:00 /sbin/mingetty tty4
root 3911 0.0 0.0 1824 620 tty5 Ss+ Jul14 0:00 /sbin/mingetty tty5
root 3912 0.0 0.0 1824 620 tty6 Ss+ Jul14 0:00 /sbin/mingetty tty6
root 4017 0.0 0.2 41480 2904 ? SNl Jul14 0:00 ./server_linux
root 1020 0.0 0.1 2632 1272 ? S 18:49 0:00 /bin/sh ./hlds_run -binary ./hlds_i686 -game cstrike +maxplayers 20ß +map de_dust2 -autoupdate
root 1021 0.2 5.4 64480 55460 ? S 18:49 0:01 ./hlds_i686 -binary ./hlds_i686 -game cstrike +maxplayers 20ß +map de_dust2 -autoupdate -pingb
root 1185 0.0 0.1 2628 1272 ? S 18:53 0:00 /bin/sh ./hlds_run -binary ./hlds_i686 -game cstrike +maxplayers 12 -autoupdate -pingboost 2 -
root 1186 0.3 5.4 64832 55820 ? S 18:53 0:01 ./hlds_i686 -binary ./hlds_i686 -game cstrike +maxplayers 12 -autoupdate -pingboost 2 -port 27
root 1217 0.0 0.2 8516 2524 ? Ss 18:57 0:00 sshd: root@notty
root 1220 0.0 0.1 2840 1376 ? Ss 18:57 0:00 -bash
root 1260 0.1 0.2 8556 2516 ? Ss 18:58 0:00 sshd: root@pts/1
root 1263 0.2 0.1 2980 1728 pts/1 Ss 18:58 0:00 -bash
root 1285 0.0 0.0 2372 704 pts/1 R+ 18:58 0:00 ps uax
fallen-soulz:~ #

Was brauch ich davon und was nicht? aber bitte dann mit erklärung was das is und wieso ich das net brauch.
 
Zurück
Oben