View previous topic :: View next topic |
Author |
Message |
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
Posted: Wed Jul 31, 2013 6:00 pm Post subject: Autostart in systemd, how i can start proceses like ldap,vdr |
|
|
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 |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Aug 05, 2013 2:26 pm Post subject: |
|
|
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 |
|
|
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
Posted: Mon Aug 05, 2013 7:39 pm Post subject: |
|
|
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 |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Aug 05, 2013 9:25 pm Post subject: |
|
|
Copy the units to /etc/systemd/system and edit WantedBy and After according to your needs! |
|
Back to top |
|
|
|