/srv/irclogs.ubuntu.com/2012/09/03/#upstart.txt

hypermuxhi. how can i get upstart to see my conf file? i created /etc/init/myserver.conf02:14
hypermuxbut when i initctl list | grep myserver02:14
hypermuxi dont see it02:14
ionLook at the error message in syslog.02:18
pixie79hi all, my devs want to use perlbrew for running perl daemons out of  - which need to run under the user nobody who has no shell. perlbrew uses a bashrc style file to setup its environment - is there a way to source the environment but not give the user a shell and still run under perlbrew whilst the process has been launched by nobody?14:50
SpamapSpixie79: yes15:05
SpamapSpixie79: you can setup the environment before you switch users very easily15:05
pixie79ok that would be good, and keep the running user as a non login user for security?15:06
SpamapSpixie79: is there any reason you can't put the environment variables in the upstart job as env statements?15:06
pixie79SpamapS: that is what i said but they seemed to think they would not be populated down to forked scripts which the dameon starts15:07
SpamapSof course it will15:08
SpamapSunless those daemons explicitly set an environment different than their own15:08
pixie79thanks - i will take it back to them15:14
pixie79does this make sense'   start on started tty /dev/tty '15:22
pixie79or /dev/tty1 even15:22
pixie79i seem to be in a mix where we have things on initctl but being started by init.d15:23
SpamapShm15:29
SpamapSpixie79: why are you starting after tty?15:30
SpamapSpixie79: 99.9% of things should be 'start on runlevel [2345]'15:30
pixie79yep i realised that after - although some things seem to start sometimes and not others15:30
SpamapSpixie79: if there are errors in any of the tracked processes, you'll see that in /var/log/syslog15:31
pixie79SpamapS: what is the best way to tell init to wait for a user to exist before starting a process - i am thinking zabbix here - the user exists in ldap via sssd which seems to sometimes start later and then takes a few seconds to cache15:32
SpamapSwait for a user to exist?15:33
SpamapSpixie79: sssd is local?15:33
pixie79sssd is a local daemon that caches ldap15:34
pixie79which is remote15:34
SpamapSpixie79: sounds like the job should be retrying if it is meant to depend on a network service.15:34
pixie79SpamapS: it is set to but seems to get stuck start/running - but is not running15:34
SpamapSpixie79: another option is to have sssd emit an event when it is ready to serve requests (if it is already an upstart job, 'started sssd') and start on that... but IMO, that becomes complicated.15:34
pixie79ok - i might add a pre to do a getent passwd zabbix| grep zabbix and match if that is true15:35
SpamapSpixie79: best option might be to start sssd from a separate task that does 'start on starting rc-sysinit' .. that will make sure sssd is started before runlevel 215:36
pixie79ok15:36
SpamapSpixie79: which it should be doing, because really if it provides user services, it should be started and operational before "multi user mode"15:37
SpamapSpixie79: where is sssd coming from, btw? a package or somewhere else?15:37
pixie79yep - no i think redhat have just added it to init.d15:37
pixie79but it would seem init kicks in before or at the same time15:37
SpamapSpixie79: what OS is this?15:45
pixie79rhel 6.3 but under openvz15:46
SpamapSpixie79: yeah, so I'm not sure if rhel6.3 has 'rc-sysinit'.. 15:49
pixie79this seems to do the tick, after start on started sssd; in the zabbix script pre-start with if ! [ `/bin/sh -c '/bin/chmod 1777 /dev/shm'; sleep 10; getent passwd zabbix | cut -f 1 -d :` == "zabbix" ]; then echo "Zabbix User does not Exist yet" | logger -t ZABBIX -p daemon.info; stop; exit 0; fi15:57
jMCgThis is a horrible script ^20:37

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!