Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lirc i irexec jako demon
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish)
View previous topic :: View next topic  
Author Message
kuku
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2004
Posts: 142

PostPosted: Sun Feb 26, 2006 9:28 am    Post subject: lirc i irexec jako demon Reply with quote

zainstalowalem lirca i jest fajnie z jednym ale:
przydałby się skrypt w /etc/init.d który uruchamiałby irexec bo aktualnie uruchamian go jako użytkownik co jest mało automatyczne więc napisałem cos takiego:
/etc/init.d/irexec
Code:
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/lircd,v 1.6 2004/09/26 21:27:07 lanius Exp $

depend() {
        need lircd
}

start() {
        ebegin "Starting irexec"
        /usr/bin/irexec --daemon ${IREXEC_OPTS}
        eend $?
}

stop() {
        ebegin "Stopping irexec"
        killall irexec
        eend $?
}

/etc/conf.d/irexec
Code:

IREXEC_OPTS="/etc/lircrc"

no a w /etc/lircrc normalna konfiguracja jak w ~/.lircrc

co mógłbym poprawić - chce to posłać na bugzille (to killall irexec mi się nie podoba ale idealnie mi tam pasuje ;)
Back to top
View user's profile Send private message
milu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 1122
Location: Poland, Konstancin-Jeziorna

PostPosted: Mon Feb 27, 2006 1:50 pm    Post subject: Reply with quote

podejrzyj w innych skryptach jak uzywane jest start-stop-daemon czy coś podobnego do startowania demonów i zrób analogicznie - unikniesz killall'a
_________________
Pozdrawiam,
Milu
------------------------------------
Registered Linux User: #246079

Zanim zadasz pytanie przeczytaj to dokładnie!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum