diff --git a/precommit-hooks/find-data-files b/precommit-hooks/find-data-files index a88cc23..f14d556 100644 --- a/precommit-hooks/find-data-files +++ b/precommit-hooks/find-data-files @@ -1,6 +1,6 @@ #!/bin/bash -result="$(find roles/*/{files,templates} -type f -exec file {} \; | grep -Ev ASCII\ text\|empty\|Unicode\ text)" +result="$(find roles/*/{files,templates} -type f -exec file {} \; | grep -Ev ASCII\ text\|empty\|Unicode\ text | grep -v motd.txt.j2)" if [ -n "$result" ]; then echo "These files need to be evaluated -- generally, don't commit data files to Git." echo "$result" diff --git a/roles/IRC/files/services/irc.service b/roles/IRC/files/services/irc.service index 1c3055f..dd4c2ea 100644 --- a/roles/IRC/files/services/irc.service +++ b/roles/IRC/files/services/irc.service @@ -6,9 +6,9 @@ After=network.target [Service] Type=forking PIDFile=/var/lib/inspircd/inspircd.pid -ExecStart=/usr/lib/inspircd/inspircd start -ExecReload=/usr/lib/inspircd/inspircd rehash -ExecStop=/usr/lib/inspircd/inspircd stop +ExecStart=/usr/bin/inspircd +ExecReload=kill -HUP $MAINPID +ExecStop=kill $MAINPID Restart=always User=ircd Group=ircd diff --git a/roles/IRC/tasks/daemon.yml b/roles/IRC/tasks/daemon.yml index 2bb57eb..05f9952 100644 --- a/roles/IRC/tasks/daemon.yml +++ b/roles/IRC/tasks/daemon.yml @@ -27,6 +27,22 @@ group: ircd mode: 0640 + - name: Copy service file + become: yes + register: servicesfile + copy: + src: services/irc.service + dest: /usr/lib/systemd/system/irc.service + owner: root + group: root + mode: 0644 + + - name: Reload services + when: servicesfile.changed + become: yes + systemd: + daemon_reload: true + - name: Copy config and fill in attributes register: templatefiles become: yes @@ -44,21 +60,25 @@ - rules.txt - motd.txt - - name: Copy service file + - name: Tracking directory become: yes - register: servicesfile - copy: - src: services/irc.service - dest: /usr/lib/systemd/system/irc.service - owner: root - group: root - mode: 0644 + file: + dest: "/etc/inspircd/data/" + owner: ircd + group: ircd + mode: 0750 + state: directory - - name: Reload services - when: servicesfile.changed + - name: Ensure tracking files become: yes - systemd: - daemon_reload: true + file: + dest: "/etc/inspircd/{{ item }}" + owner: ircd + group: ircd + mode: 0600 + loop: + - 'data/xline.db' + - 'data/permchannels.conf' - name: Ensure service running become: yes diff --git a/roles/IRC/templates/inspircd/inspircd.conf.j2 b/roles/IRC/templates/inspircd/inspircd.conf.j2 index 1861318..365c12e 100644 --- a/roles/IRC/templates/inspircd/inspircd.conf.j2 +++ b/roles/IRC/templates/inspircd/inspircd.conf.j2 @@ -526,7 +526,7 @@ # The following log tag is highly default and uncustomised. It is recommended you # sort out your own log tags. This is just here so you get some output. - + #-#-#-#-#-#-#-#-#-#-#-#-#- WHOWAS OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-# # # diff --git a/roles/IRC/templates/inspircd/modules.conf.j2 b/roles/IRC/templates/inspircd/modules.conf.j2 index 28d8bf0..17f187f 100644 --- a/roles/IRC/templates/inspircd/modules.conf.j2 +++ b/roles/IRC/templates/inspircd/modules.conf.j2 @@ -518,7 +518,7 @@ # if not specified, and will always have a "-" appended. # # #-#-#-#-#-#-#-#-#-#-#-#- CLOSE MODULE #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# diff --git a/roles/IRC/templates/inspircd/motd.txt.j2 b/roles/IRC/templates/inspircd/motd.txt.j2 index 951ba1f..211243a 100644 --- a/roles/IRC/templates/inspircd/motd.txt.j2 +++ b/roles/IRC/templates/inspircd/motd.txt.j2 @@ -1,28 +1,27 @@ -........................................ -........................................ -..................HHH................... -................HHHHHHHH................ -.............HHHHHHHHHHHHH.............. -..........HHHHHHH.....HHHHHHH........... -.......HHHHHHH...........HHHHHHH........ -......HHHHH.................HHHHH....... -......HHH.....................HHH....... -......HHH.....HH....#.........HHH....... -......HHH.....HH.....###......HHH....... -......HHH.....HH........##....HHH....... -......HHH.....HH........##....HHH....... -......HHH.....HH.....###......HHH....... -......HHH.....HH....#.........HHH....... -......HHH.....................HHH....... -......HHHHH.................HHHHH....... -.......HHHHHHH...........HHHHHHH........ -..........HHHHHHH......HHHHHHH.......... -............HHHHHHH.HHHHHHH............. -...............HHHHHHHHH................ -..................HHH................... -........................................ -........................................ -........................................ +........................................... +........................................... +.....................4HHH................... +..................4HHHHHHHHH................ +...............4HHHHHHHHHHHHHH.............. +...........4HHHHHHHH.....4HHHHHHHH........... +........4HHHHHHHH...........4HHHHHHHH........ +.......4HHHHHH.................4HHHHHH....... +.......4HHHH.....................4HHHH....... +.......4HHHH....4HHH....#.........4HHHH....... +.......4HHHH....4HHH.....###......4HHHH....... +.......4HHHH....4HHH........##....4HHHH....... +.......4HHHH....4HHH........##....4HHHH....... +.......4HHHH....4HHH.....###......4HHHH....... +.......4HHHH....4HHH....#.........4HHHH....... +.......4HHHH.....................4HHHH....... +.......4HHHHHH.................4HHHHHH....... +........4HHHHHHHH...........4HHHHHHHH........ +...........4HHHHHHHH......4HHHHHHHH.......... +.............4HHHHHHHH.4HHHHHHHH............. +.................4HHHHHHHHHH................ +....................4HHHH................... +........................................... +........................................... Welcome to the AniNIX/IRC secure chat system! Reach out to ops and founders in #lobby if you @@ -39,7 +38,7 @@ use the following to authenticate: "/quote ns identify " For reference, check out the Wiki: -https://{{ external_domain }}/AniNIX/Wiki +4https://{{ external_domain }}/AniNIX/Wiki User code of conduct is recorded below: -https://{{ external_domain }}/AniNIX/Wiki/src/branch/main/Policies/User_Ethics.md +4https://{{ external_domain }}/AniNIX/Wiki/src/branch/main/Policies/User_Ethics.md diff --git a/roles/SSL/files/certbot.service b/roles/SSL/files/certbot.service index d773630..657a4cd 100755 --- a/roles/SSL/files/certbot.service +++ b/roles/SSL/files/certbot.service @@ -2,7 +2,7 @@ Description=Certbot [Service] -ExecStart=certbot renew -w /var/lib/letsencrypt/ --preferred-chain "ISRG Root X1" +ExecStart=certbot renew -w /var/lib/letsencrypt/ --preferred-chain "ISRG Root X1" ExecStartPost=-/usr/bin/systemctl reload webserver ExecStartPost=-/usr/bin/systemctl reload irc KillMode=process