Managing correct epoptes startup using upstart.

This commit is contained in:
Emiliano Vavassori 2015-10-02 21:47:02 +02:00
parent fd953c0a84
commit 353d06c0c9
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# vim:sts=2:sw=2
author "BgLUG - Bergamo Linux Users Group <info@bglug.it>"
description "Sanely starts epoptes server daemon on ubuntu."
start on net-device-up and started winbind
stop on stopped winbind
exec /usr/bin/twistd -n \
--logfile "/var/log/epoptes.log" --pidfile "/var/run/epoptes.pid" \
epoptes
respawn

View File

@ -6,3 +6,21 @@
dest: /etc/default/epoptes
line: 'SOCKET_GROUP="{{ ansible_local.domain.domainshort }}\docenti"'
state: present
- name: Disabling sysv start
shell: update-rc.d -f epoptes remove
sudo: yes
- name: Installing upstart service
copy:
src: epoptes.conf
dest: /etc/init/epoptes.conf
owner: root
group: root
mode: 0644
- name: Ensure to start the service
service:
name: epoptes
state: started
sudo: yes