Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Autostart in systemd, how i can start proceses like ldap,vdr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Wed Jul 31, 2013 6:00 pm    Post subject: Autostart in systemd, how i can start proceses like ldap,vdr Reply with quote

Hi,

i 've upgraded to gnome 3.8 over portage. So my maintproblem was to authenticate over ldapserver. But this is an other thing. How i can start my ldapserver oder my vdrserver. I 've writen some systemd startscripts. The scrpits work fine. But only when i start simple things like "modprobe vbox". Here are my startscripts for vdr and ldap:

Code:
[Unit]
Description=Starten den lokalen LDAPserver und den VDRserver
After=NetworkManager.service

[Service]
Type=oneshot
ExecStart=/etc/local.d/slapdandvdr.start

[Install]
WantedBy=multi-user.target


The script looks this:
Code:
#!/bin/bash
/usr/lib64/openldap/slapd  -g ldap -f /etc/openldap/slapd.conf -h ldap://
/usr/bin/vdr -u vdr --watchdog=60 --cachedir=/var/cache/vdr --log=2 --video=/home/vdr-aufnahmen --record=/usr/share/vdr/bin/vdrrecord-gate.sh -D 0 --plugin=epgsearch  --plugin=sc  --plugin=live -s 8443 --plugin=streamdev-server -r /usr/share/vdr/streamdev/externremux.sh  --plugin=xvdr  --daemon


When i would like to start these services via systemd it does not work. But i works when i execute the script (/etc/local.d/slapdandvdr.start) directly per hand. What must i do? And what a f... why the startscipts vor ldap and vdr arent here?


Thanks a lot and regards
boospy
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Aug 05, 2013 2:26 pm    Post subject: Reply with quote

A kind of circle?

NM-needs-UserAuth
UserAuth-needs-LDAP
LDAP-needs-Net
Net-needs-NM
NM-needs-UserAuth

... And there is pam with plugable modules
I don't know if possible, but I heard of cached credentials ...
Back to top
View user's profile Send private message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Mon Aug 05, 2013 7:39 pm    Post subject: Reply with quote

I know, but this is not the problem. With openrc in works normaly. Only with systemd i have these problems. And no, ldap need no net. Because on every client is an ldapslave.

Or you mean systemd have some bad dependencies, so when i add this lines to the nsswitch.conf
Code:
passwd:      compat ldap [notfound=continue]
shadow:      compat ldap [notfound=continue]
group:       compat ldap [notfound=continue]

Networkmanager can't start...
you joking me?

Regards
boospy
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Aug 05, 2013 9:25 pm    Post subject: Reply with quote

Copy the units to /etc/systemd/system and edit WantedBy and After according to your needs!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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