The UNIX and Linux Forums  
Ciao e benvenuto da parte degli Stati Uniti al UNIX e Linux Forum! Grazie per la visita ed unirsi alla nostra Comunità Globale.

Go Back   UNIX e Linux Forum > Inizio Forum > Shell scripting e di programmazione
.
google unix.com



Shell scripting e di programmazione Pubblica domande su KSH, CSH, SH, Bash, Perl, PHP, sed, awk e da altri script di shell e linguaggi di scripting shell qui.

Più di UNIX e Linux Forum Argomenti potreste trovare utili
Filo Thread Starter Forum Risposte Ultimo Post
Entra 'syslog start / stop / restart' messaggi SunnyK UNIX e avanzata per utenti esperti 1 07-14-2008 12:16 PM
Come start / stop / riavvio di NFS su AIX jredx AIX 2 06-25-2008 05:00 AM
Come faccio a creare un programma di avviare automaticamente dopo il riavvio del computer / startup? munna_dude Shell scripting e di programmazione 1 02-07-2007 09:13 AM
Start Stop Apache MILLERJ62 AIX 2 12-27-2005 05:40 PM
Stop / Start proftpd Lomic UNIX for Dummies Domande & Risposte 1 12-09-2004 09:38 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Cerca in questo Thread Rate Thread Modalità di visualizzazione
  #1 (permalink)  
Old 01-02-2009
Cotture Bakes is offline
Utente Registrato
  
 

Iscriviti Data: Sep 2008
Interventi: 12
Start Stop Riavviare

Mi chiedo come devo fare uno script che può avviare, arrestare e riavviare un altro script.
Che cosa ho bisogno per essere in grado di fare, è avviare e fermare un perl script dalla riga di comando. Il modo più semplice di fare questo sembra essere quella di avere un altro script, a partire e fermare gli altri script. Ho BASH, DASH, KSH, PERL installato.
Qualcuno ha qualche idea?
  #2 (permalink)  
Old 01-02-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Iscriviti Data: luglio 2006
Posizione: Germania, Berlin
Messaggi: 2.980
Provate a dare un'occhiata al runlevel script in / etc / init.d, / etc / rcx.d (dipende dal vostro sistema operativo). questi script stanno facendo esattamente quello che vuoi fare ...
  #3 (permalink)  
Old 01-02-2009
Cotture Bakes is offline
Utente Registrato
  
 

Iscriviti Data: Sep 2008
Interventi: 12
beh, non hanno nemmeno quelle, dato che ho ubuntu. Credo che il suo init.d in Ubuntu. Cercherò e trovare una semplice.
  #4 (permalink)  
Old 01-02-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Iscriviti Data: luglio 2006
Posizione: Germania, Berlin
Messaggi: 2.980
ci sono runlevel script in ubuntu ... ma ho solo una vecchia versione di guardare (6,06). Ho inviato il crond start / stop script.

Codice:
#!/bin/sh
# Start/stop the cron daemon.
#
### BEGIN INIT INFO
# Provides:          cron
# Required-Start:    $syslog $time
# Required-Stop:     $syslog $time
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: Regular background program processing daemon
# Description:       cron is a standard UNIX program that runs user-specified 
#                    programs at periodic scheduled times. vixie cron adds a 
#                    number of features to the basic UNIX cron, including better
#                    security and more powerful configuration options.

### END INIT INFO


test -f /usr/sbin/cron || exit 0

#LSBNAMES='-l'  # Uncomment for LSB name support in /etc/cron.d/

. /lib/lsb/init-functions

case "$1" in
start)	log_begin_msg "Starting periodic command scheduler..."
        start-stop-daemon --start --quiet --pidfile /var/run/crond.pid --name cr
on --startas /usr/sbin/cron -- $LSBNAMES
        log_end_msg $?
	;;
stop)	log_begin_msg "Stopping periodic command scheduler..."
        start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid --name cro
n
        log_end_msg $?
        ;;
restart) log_begin_msg "Restarting periodic command scheduler..."
        start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/crond.pid 
--name cron
        start-stop-daemon --start --quiet --pidfile /var/run/crond.pid --name cr
on --startas /usr/sbin/cron -- $LSBNAMES
        log_end_msg $?
        ;;
reload|force-reload) log_begin_msg "Reloading configuration files for periodic c
ommand scheduler..."
	# cron reloads automatically
        log_end_msg 0
        ;;
*)	log_success_msg "Usage: /etc/init.d/cron start|stop|restart|reload|force
-reload"
        exit 1 
        ;;
esac
exit 0
  #5 (permalink)  
Old 01-02-2009
Cotture Bakes is offline
Utente Registrato
  
 

Iscriviti Data: Sep 2008
Interventi: 12
Ok, sto veramente confuso.
Ho appena trascorso non hanno abbastanza tempo di scripting per essere in grado di fare i compiti complessi.
Non voglio chiedere troppo, ma diciamo che voglio che lo script di controllo
/ home / cotture / control.sh?
chiunque non voglia fare un esempio per me?
  #6 (permalink)  
Old 01-02-2009
Cotture Bakes is offline
Utente Registrato
  
 

Iscriviti Data: Sep 2008
Interventi: 12
che almeno uno di dimensioni inferiori a uno i apache è stato a guardare!
  #7 (permalink)  
Old 01-02-2009
Cotture Bakes is offline
Utente Registrato
  
 

Iscriviti Data: Sep 2008
Interventi: 12
In tutta onestà posso fare alcun senso di che, I'm dislessici e, se non è definito molto bene, ho appena trovo semi-impossibile. Come pure che, io non sono del tutto sicuro che cosa questo significa, ad eccezione di chiamata start-stop -demone per uccidere / avviare il processo
Closed Thread

Segnalibri

Thread Tools Cerca in questo Thread
Cerca in questo Thread:

Ricerca Avanzata
Modalità di visualizzazione Vota questo thread
Vota questo thread:

Distacco regolamento
Tu non può post nuovo thread
Tu non può inviare una risposta
Tu non può postare allegati
Tu non può modificare i tuoi post

BB codice è Su
Smilies sono Su
[IMG] codice Su
Codice HTML è Chiuso
Trackbacks sono Su
Pingbacks sono Su
Refbacks sono Su




Tutti gli orari sono GMT -4. La data di oggi è 09:36 AM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Traduzioni Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
UNIX e Linux Forum Content Copyright © 1993-2009. Tutti i diritti Reserved.Ad di gestione da RedTyger

Contenuti pertinenti URL da vBSEO 3.2.0