Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
lancer eibd et linknx
#7
Perso, je me suis fait un script pour init.d.
Au contraire, je suis sous fedora, il faudra peut être donc l'adapter.
Si çà peut aider...

#!/bin/bash
#
# eib: Starts the Name Switch Cache Daemon
#
# chkconfig: - 30 74
# description: This is a daemon which handles passwd and group lookups \
# for running programs and cache the results for the next \
# query. You should start this daemon if you use \
# slow naming services like NIS, NIS+, LDAP, or hesiod.
# processname: /usr/local/bin/eibnetmux
# config: /etc/sysconfig/eib
#
### BEGIN INIT INFO
# Provides: eib
# Required-Start: $syslog
# Default-Stop: 0 1 6
# Short-Description: Starts the Name Switch Cache Daemon
# Description: This is a daemon which handles passwd and group lookups \
# for running programs and cache the results for the next \
# query. You should start this daemon if you use \
# slow naming services like NIS, NIS+, LDAP, or hesiod.
### END INIT INFO

# Sanity checks.
[ -x /usr/local/bin/eibnetmux ] || exit 0

# Source function library.
. /etc/init.d/functions

# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
[ -r /etc/sysconfig/eib ] && . /etc/sysconfig/eib

RETVAL=0
progmux=eibnetmux
progtrace=eibtrace

start () {
[ -d /var/run/eib ] || mkdir /var/run/eib
echo -n $"Starting $progmux: "
daemon /usr/local/bin/eibnetmux -s -t -u -e -d 192.168.254.50
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/eibnetmux

echo -n $"Starting $progtrace: "
daemon /usr/local/bin/eibtrace 192.168.254.1
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/eibtrace


echo -n $"Starting linknx: "
daemon /usr/bin/linknx --config=/etc/linknx.xml -d
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/linknx


return $RETVAL
}

stop () {
echo -n $"Stopping $progmux: "
killall eibtrace
success $"$prog shutdown"

echo -n $"Stopping $progtrace: "
killall eibnetmux

echo -n $"Stopping linknx: "
killall linknx

rm -f /var/lock/subsys/eib
success $"$prog shutdown"
echo
return $RETVAL
}

restart() {
stop
start
}

# See how we were called.
case "$1" in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
status)
status eibtrace
status eibnetmux
RETVAL=$?
;;
restart)
restart
RETVAL=$?
;;
try-restart | condrestart)
[ -e /var/lock/subsys/nscd ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
RETVAL=1
;;
esac
exit $RETVAL


Le 15/09/2010 23:49, Frédéric a écrit :
> On mercredi 15 septembre 2010, chitloft wrote:
>
>> je cherche a lancer automatiquement au démarrage de ma vm ubuntu les
>> commandes eibd et linknx. pourriez vous me dire comment vous faites ?
>> voici ce que je dois taper.
>> eibd -t1023 -i usb:1:2:1:0
>> linknx -c/var/www/knxweb/linknx.xml
>>
>> j'étais parti sur la base du /etc./init.d/skeleton, mais je n'y arrive
>> pas a implemeter correctement le chargement. qq1 l'a t il deja
>> implémenté ou bien passez vous par autre chose ?
> Je lance les services de ce genre via la crontab :
>
> @reboot<chemin_absolu_vers_script>
>
> man crontab pour plus d'infos.
>


Messages dans ce sujet
lancer eibd et linknx - par chitloft - 15/09/2010, 20:10:54
lancer eibd et linknx - par Christophe Bruchez - 15/09/2010, 20:41:51
lancer eibd et linknx - par chitloft - 15/09/2010, 21:13:22
lancer eibd et linknx - par Christophe Bruchez - 15/09/2010, 21:17:50
lancer eibd et linknx - par chitloft - 15/09/2010, 21:38:56
lancer eibd et linknx - par Frédéric - 15/09/2010, 22:49:31
lancer eibd et linknx - par Laurent ARNAL - 16/09/2010, 08:31:53
lancer eibd et linknx - par Frédéric - 16/09/2010, 09:20:23
lancer eibd et linknx - par Laurent ARNAL - 16/09/2010, 10:02:10
lancer eibd et linknx - par Cédric Mouton - 16/09/2010, 14:29:34

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)