[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux] script de démarrage
Bonjour,
ouaip, c'est normal. C'est la ligne :
su -c $INTERBASE'/bin/ibmgr -start -forever' interbase
qui est foireuse.
La syntaxe est : su [OPTION]... [-] [USER [ARG]...]
donc su -c interbase '$INTERBASE/bin/ibmgr -start -forever'
attention aux singles quotes. Si ça ne marche pas, remplaces les simples quotes
par des doubles quotes. (=guillemets)
Hope this help you.
Benjamin
On Thu, 8 Nov 2001, Gaetan GUYODO wrote:
> Salut,
> j'ai un script qui est censé démarrer mon serveur Interbase, qui est installé
> sous /opt/interbase, mais qui a un lien symbolique sous /usr/interbase
> (/usr/interbase est le home de l'utilisateur interbase.
> PS: si vous cherchez une explication, j'ai suivi le guide à cette adresse
> http://community.borland.com/article/0,1410,27761,00.html
> c'est pas bien ?
> Toujours est-il que ce script ne me démarre pas le serveur Interbase... et
> quand je me logue en root, que je fais ./ibserver, il me dit
>
> ./ibserver: /bin: is a directory
> Usage: $0 { start | stop }
>
> Par contre, si je fais ./ ibserver start alors là, pas de problème...
>
> qqun a une idée du pourquoi ?
> Voici le script en question :
>
>
>
> /********************* file contents ****************************/
> #! /bin/sh
> # ibserver script - Start/stop the InterBase daemon
>
> # Set these environment variables if and only if they are not set.
> : ${INTERBASE:=/usr/interbase}
> : ${ISC_USER:=SYSDBA}
> : ${ISC_PASSWORD:=masterkey}
> # WARNING: in a real-world installation, you should not put the
> # SYSDBA password in a publicly-readable file. To protect it:
> # chmod 700 ibserver; chown root ibserver
> #export INTERBASE
> #export ISC_USER
> #export ISC_PASSWORD
>
> ibserver_start()
> {
> # This example assumes the InterBase server is
> # being started as UNIX user 'interbase'.
> # echo $INTERBASE'/bin/ibmgr -start -forever' | su interbase
> su -c $INTERBASE'/bin/ibmgr -start -forever' interbase
>
> }
>
> ibserver_stop()
> {
> # No need to su, since $ISC_USER and $ISC_PASSWORD validate us.
> $INTERBASE/bin/ibmgr -shut -password $ISC_PASSWORD
> }
>
> case $1 in
> 'start' )
> echo -e 'InterBase Server starting... c'
> ibserver_start ;;
> 'start_msg' )
> echo -e 'InterBase Server starting... c' ;;
> 'stop' )
> echo -e 'InterBase Server stopping... c'
> ibserver_stop ;;
> 'stop_msg' ) echo -e 'InterBase Server stopping... c' ;;
>
> *) echo 'Usage: $0 { start | stop }'; exit 1;;
>
> esac
>
> exit 0
>
> /********************* end of contents **************************/
>
>
> [ Soyez précis dans vos sujets svp afin de déterminer directement ]
> [ le type de demande... ]
> [ Pour vous (dés)inscrire, aller sur http://unixtech.be/ml.php ]
> [ Archives de la mailing list: http://archives.unixtech.be/linux/ ]
> [ http://unixtech.be Contact: listmaster@unixtech.be ]
>
Cybersalutations
Benjamin Gonay
[ Soyez précis dans vos sujets svp afin de déterminer directement ]
[ le type de demande... ]
[ Pour vous (dés)inscrire, aller sur http://unixtech.be/ml.php ]
[ Archives de la mailing list: http://archives.unixtech.be/linux/ ]
[ http://unixtech.be Contact: listmaster@unixtech.be ]