Re: [Gelistirici] playground/ertugrul/experimantal/mongodb - devam
Çarşamba 21 Temmuz 2010 günü (saat 19:54:38) Ertuğrul Erata şunları yazmıştı: > args="--dbpath=/var/lib/mongodb" olarak düzelttim şimdi service komutu > başlatıyor ancak alt satıra düüşmüyor pid oluşmuyor. /var/run/mongodb/mongodb.pid mi oluşmuyor? Öyleyse, startService()'e makepid=True argümanı verebilirsiniz Alta düşmüyor dediğiniz, servisin çalışması ancak kendini daemon olarak arkaplana atmaması ise aynı metoda bir de detach=True argümanı verebilirsiniz. ___ Gelistirici mailing list Gelistirici@pardus.org.tr http://liste.pardus.org.tr/mailman/listinfo/gelistirici
Re: [Gelistirici] playground/ertugrul/experimantal/mongodb - devam
args="--dbpath=/var/lib/mongodb" olarak düzelttim şimdi service komutu başlatıyor ancak alt satıra düüşmüyor pid oluşmuyor. 2010/7/21 Ertuğrul Erata > @bahadır service.py de bir sorun var bir türlü servisi başlatmıyor ? > > Traceback (most recent call last) > File "/bin/service", line 369, in > main(sys.argv[1:]) > File "/bin/service", line 340, in main > list_services(use_color) > File "/bin/service", line 229, in list_services > format_service_list(lala, use_color) > File "/bin/service", line 126, in format_service_list > cstart = "\x1b%s" % colors[service.state] > KeyError: dbus.String(u'conditional') > > service list te bu hatayı veriyor. ancak service.py de geçmiyor ki ? > > mongod --help te > --dbpath arg (=/data/db/) directory for datafiles > > > > 2010/7/21 Ertuğrul Erata > > Author: ertugrul >> Date: Wed Jul 21 19:35:40 2010 >> New Revision: 96210 >> >> Modified: >> playground/ertugrul/experimantal/mongodb/actions.py >> playground/ertugrul/experimantal/mongodb/comar/service.py >> playground/ertugrul/experimantal/mongodb/files/mongodb.confd >> playground/ertugrul/experimantal/mongodb/pspec.xml >> Log: >> devam >> >> >> >> --- >> actions.py |6 +++--- >> comar/service.py| 35 ++- >> files/mongodb.confd |3 +-- >> pspec.xml | 13 ++--- >> 4 files changed, 28 insertions(+), 29 deletions(-) >> >> Modified: playground/ertugrul/experimantal/mongodb/actions.py >> = >> --- playground/ertugrul/experimantal/mongodb/actions.py (original) >> +++ playground/ertugrul/experimantal/mongodb/actions.py Wed Jul 21 >> 19:35:40 2010 >> @@ -23,9 +23,9 @@ >> pisitools.dobin("%s" % i) >> >> # needed directory >> -pisitools.dodir("/var/lib/mongo") >> -pisitools.dodir("/var/log/mongo") >> -pisitools.dodir("/var/run/mongo") >> +pisitools.dodir("/var/lib/mongodb") >> +pisitools.dodir("/var/log/mongodb") >> +pisitools.dodir("/var/run/mongodb") >> >> # add man and documents >> pisitools.doman("debian/mongo*.1") >> >> Modified: playground/ertugrul/experimantal/mongodb/comar/service.py >> = >> --- playground/ertugrul/experimantal/mongodb/comar/service.py (original) >> +++ playground/ertugrul/experimantal/mongodb/comar/service.py Wed Jul 21 >> 19:35:40 2010 >> @@ -1,30 +1,31 @@ >> >> from comar.service import * >> >> -serviceType = "local" >> +serviceType = "server" >> serviceConf = "mongodb" >> -serviceDefault = "conditional" >> +serviceDefault = "off" >> >> serviceDesc = _({"en": "Mongodb", >> "tr": "Mongodb"}) >> >> +MSG_ERR_MONGODBNOTINST = _({"en": "MongoDB is not installed.", >> + "tr": "MongoDB kurulu değil.", >> + }) >> + >> +def check_mongodb(): >> +import os.path >> +if not os.path.exists("/var/lib/mongodb"): >> +fail(MSG_ERR_MONGODBNOTINST) >> + >> @synchronized >> def start(): >> -startService(command="/usr/sbin/mongodb", >> - args = config.get("args", "destroy"), >> +check_mongodb() >> +startService(command="/usr/bin/mongod", >> + args = "--datapath=/var/lib/mongodb", >> + pidfile="/var/run/mongodb/mongodb.pid", >> donotify=True) >> - >> + >> @synchronized >> def stop(): >> -stopService(command="/usr/sbin/mongodb", >> -donotify=True) >> - >> -def ready(): >> -import os >> -status = is_on() >> -if status == "on" or (status == "conditional" and >> os.path.exists("/sys/coffee/ready")): >> -start() >> - >> -def status(): >> -return checkDaemon("/var/run/mongodb.pid") >> - >> +stopService(command="/usr/bin/mongod", >> +donotify=True) >> \ No newline at end of file >> >> Modified: playground/ertugrul/experimantal/mongodb/files/mongodb.confd >> = >> --- playground/ertugrul/experimantal/mongodb/files/mongodb.confd >> (original) >> +++ playground/ertugrul/experimantal/mongodb/files/mongodb.confd >> Wed Jul 21 19:35:40 2010 >> @@ -1,7 +1,6 @@ >> # Mongodb essentials >> -MONGODB_EXEC="/usr/bin/mongod" >> MONGODB_DATA="/var/lib/mongodb" >> -MONGODB_USER="mongodb" >> +#MONGODB_USER="mongodb" >> MONGODB_PID_FILE="/var/run/mongodb/mongodb.pid" >> >> MONGODB_IP="127.0.0.1" >> >> Modified: playground/ertugrul/experimantal/mongodb/pspec.xml >> = >> --- playground/ertugrul/experimantal/mongodb/pspec.xml (original) >> +++ playground/ertugrul/experimantal/mongodb/pspec.xml Wed Jul 21 >> 19:35:40 2010 >> @@ -33,23 +33,22 @@ >> libpcap >> >> >> +/etc >> /usr/bin >> - >> /usr/share/doc >> /usr/share/man >> /va
Re: [Gelistirici] playground/ertugrul/experimantal/mongodb - devam
@bahadır service.py de bir sorun var bir türlü servisi başlatmıyor ? Traceback (most recent call last) File "/bin/service", line 369, in main(sys.argv[1:]) File "/bin/service", line 340, in main list_services(use_color) File "/bin/service", line 229, in list_services format_service_list(lala, use_color) File "/bin/service", line 126, in format_service_list cstart = "\x1b%s" % colors[service.state] KeyError: dbus.String(u'conditional') service list te bu hatayı veriyor. ancak service.py de geçmiyor ki ? mongod --help te --dbpath arg (=/data/db/) directory for datafiles 2010/7/21 Ertuğrul Erata > Author: ertugrul > Date: Wed Jul 21 19:35:40 2010 > New Revision: 96210 > > Modified: > playground/ertugrul/experimantal/mongodb/actions.py > playground/ertugrul/experimantal/mongodb/comar/service.py > playground/ertugrul/experimantal/mongodb/files/mongodb.confd > playground/ertugrul/experimantal/mongodb/pspec.xml > Log: > devam > > > > --- > actions.py |6 +++--- > comar/service.py| 35 ++- > files/mongodb.confd |3 +-- > pspec.xml | 13 ++--- > 4 files changed, 28 insertions(+), 29 deletions(-) > > Modified: playground/ertugrul/experimantal/mongodb/actions.py > = > --- playground/ertugrul/experimantal/mongodb/actions.py (original) > +++ playground/ertugrul/experimantal/mongodb/actions.py Wed Jul 21 19:35:40 > 2010 > @@ -23,9 +23,9 @@ > pisitools.dobin("%s" % i) > > # needed directory > -pisitools.dodir("/var/lib/mongo") > -pisitools.dodir("/var/log/mongo") > -pisitools.dodir("/var/run/mongo") > +pisitools.dodir("/var/lib/mongodb") > +pisitools.dodir("/var/log/mongodb") > +pisitools.dodir("/var/run/mongodb") > > # add man and documents > pisitools.doman("debian/mongo*.1") > > Modified: playground/ertugrul/experimantal/mongodb/comar/service.py > = > --- playground/ertugrul/experimantal/mongodb/comar/service.py (original) > +++ playground/ertugrul/experimantal/mongodb/comar/service.py Wed Jul 21 > 19:35:40 2010 > @@ -1,30 +1,31 @@ > > from comar.service import * > > -serviceType = "local" > +serviceType = "server" > serviceConf = "mongodb" > -serviceDefault = "conditional" > +serviceDefault = "off" > > serviceDesc = _({"en": "Mongodb", > "tr": "Mongodb"}) > > +MSG_ERR_MONGODBNOTINST = _({"en": "MongoDB is not installed.", > + "tr": "MongoDB kurulu değil.", > + }) > + > +def check_mongodb(): > +import os.path > +if not os.path.exists("/var/lib/mongodb"): > +fail(MSG_ERR_MONGODBNOTINST) > + > @synchronized > def start(): > -startService(command="/usr/sbin/mongodb", > - args = config.get("args", "destroy"), > +check_mongodb() > +startService(command="/usr/bin/mongod", > + args = "--datapath=/var/lib/mongodb", > + pidfile="/var/run/mongodb/mongodb.pid", > donotify=True) > - > + > @synchronized > def stop(): > -stopService(command="/usr/sbin/mongodb", > -donotify=True) > - > -def ready(): > -import os > -status = is_on() > -if status == "on" or (status == "conditional" and > os.path.exists("/sys/coffee/ready")): > -start() > - > -def status(): > -return checkDaemon("/var/run/mongodb.pid") > - > +stopService(command="/usr/bin/mongod", > +donotify=True) > \ No newline at end of file > > Modified: playground/ertugrul/experimantal/mongodb/files/mongodb.confd > = > --- playground/ertugrul/experimantal/mongodb/files/mongodb.confd > (original) > +++ playground/ertugrul/experimantal/mongodb/files/mongodb.confdWed > Jul 21 19:35:40 2010 > @@ -1,7 +1,6 @@ > # Mongodb essentials > -MONGODB_EXEC="/usr/bin/mongod" > MONGODB_DATA="/var/lib/mongodb" > -MONGODB_USER="mongodb" > +#MONGODB_USER="mongodb" > MONGODB_PID_FILE="/var/run/mongodb/mongodb.pid" > > MONGODB_IP="127.0.0.1" > > Modified: playground/ertugrul/experimantal/mongodb/pspec.xml > = > --- playground/ertugrul/experimantal/mongodb/pspec.xml (original) > +++ playground/ertugrul/experimantal/mongodb/pspec.xml Wed Jul 21 19:35:40 > 2010 > @@ -33,23 +33,22 @@ > libpcap > > > +/etc > /usr/bin > - > /usr/share/doc > /usr/share/man > /var > > - > > ---> > - > System.Service > > ---> > > > > ___ > paketler-commits mailing list > paketler-comm...@pardus.org.tr > http://liste.pardus.org.tr/mailman/listinfo/paketler-commit