Pārlūkot izejas kodu

Merge pull request #490 from mikeashley/znc-fix

Fix znc configuration
Allen Riddell 8 gadus atpakaļ
vecāks
revīzija
182ffc5cb4

+ 11
- 0
roles/ircbouncer/files/etc_systemd_system_znc.service Parādīt failu

@@ -0,0 +1,11 @@
1
+[Unit]
2
+Description=ZNC, an IRC bouncer
3
+After=network.target
4
+
5
+[Service]
6
+ExecStart=/usr/bin/znc --datadir=/usr/lib/znc
7
+PIDFile=/var/run/znc/znc.pid
8
+User=znc
9
+
10
+[Install]
11
+WantedBy=multi-user.target

+ 13
- 1
roles/ircbouncer/tasks/znc.yml Parādīt failu

@@ -5,6 +5,18 @@
5 5
   with_items:
6 6
     - znc
7 7
 
8
+- name: Create znc group
9
+  group: name=znc state=present
10
+
11
+- name: Create znc user
12
+  user: name=znc state=present home=/var/lib/znc system=yes group=znc shell=/usr/sbin/nologin
13
+
14
+- name: Ensure pid directory exists
15
+  file: state=directory path=/var/run/znc group=znc owner=znc
16
+
17
+- name: Copy znc service file into place
18
+  copy: src=etc_systemd_system_znc.service dest=/etc/systemd/system/znc.service mode=0644
19
+
8 20
 - name: Create a combined version of the private key with public cert and intermediate + root CAs
9 21
   shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
10 22
     /usr/lib/znc/znc.pem creates=/usr/lib/znc/znc.pem
@@ -33,4 +45,4 @@
33 45
   tags: ufw
34 46
 
35 47
 - name: Ensure znc is a system service
36
-  service: name=znc state=started enabled=true
48
+  service: name=znc state=restarted enabled=true

+ 1
- 1
roles/monitoring/tasks/monit.yml Parādīt failu

@@ -15,7 +15,7 @@
15 15
   notify: restart monit
16 16
 
17 17
 - name: Determine if ZNC is installed
18
-  stat: path=/etc/lib/znc/configs/znc.conf
18
+  stat: path=/usr/lib/znc/configs/znc.conf
19 19
   register: znc_config_file
20 20
 
21 21
 - name: Copy ZNC monit service config files into place

Notiek ielāde…
Atcelt
Saglabāt