add risotto target

This commit is contained in:
Emmanuel Garette 2022-08-18 16:38:37 +02:00
parent 543ba30f8c
commit 42879ad5a1
21 changed files with 52 additions and 24 deletions

View file

@ -1,12 +1,11 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from os.path import join
from filecmp import dircmp from filecmp import dircmp
from difflib import unified_diff from difflib import unified_diff
from sys import stdout, argv from sys import stdout, argv
from os import walk from os import walk
from os.path import join from os.path import join, islink
from datetime import datetime, timezone from datetime import datetime, timezone
@ -87,10 +86,13 @@ for filename in old - new:
for filename in new - old: for filename in new - old:
print(f'\n- fichier {filename} ajouté :\n') if islink(join(NEW_DIR, filename)):
with open(join(NEW_DIR, filename), 'r') as fh: print(f'\n- lien {filename} ajouté\n')
if WEBSITE: else:
print('```') print(f'\n- fichier {filename} ajouté :\n')
print(fh.read()) with open(join(NEW_DIR, filename), 'r') as fh:
if WEBSITE: if WEBSITE:
print('```') print('```')
print(fh.read())
if WEBSITE:
print('```')

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
After=network.target After=risotto.target
[Service] [Service]
ExecStart= ExecStart=

View file

@ -1,7 +1,7 @@
#ORIGIN https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service #ORIGIN https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service
[Unit] [Unit]
Description=Gitea (Git with a cup of tea) Description=Gitea (Git with a cup of tea)
After=network.target postgresqlclient.service After=risotto.target
[Service] [Service]
# Modify these two values and uncomment them if you have # Modify these two values and uncomment them if you have

View file

@ -2,7 +2,7 @@
<rougail version="0.10"> <rougail version="0.10">
<services> <services>
<service name="ldap_client" manage="False"> <service name="ldap-client" target="risotto" engine="creole">
<file source="ldap.conf" file_type="variable">ldap_client_file</file> <file source="ldap.conf" file_type="variable">ldap_client_file</file>
<file source="ca_LDAP.crt" file_type="variable">ldap_ca_file</file> <file source="ca_LDAP.crt" file_type="variable">ldap_ca_file</file>
<file source="ldap_client.crt" file_type="variable">ldap_cert_file</file> <file source="ldap_client.crt" file_type="variable">ldap_cert_file</file>

View file

@ -0,0 +1,8 @@
[Unit]
After=network-online.target
Before=risotto.target
[Service]
Type=oneshot
ExecStart=/usr/bin/timeout 90 bash -c 'while ! 3<> /dev/tcp/%%ldap_server_address/%%ldap_port; do sleep 1; done'

View file

@ -1,7 +1,6 @@
[Unit] [Unit]
After=nginx.service After=risotto.target nginx.service
[Service] [Service]
ExecStartPre=/usr/bin/timeout 90 bash -c 'while ! 3<> /dev/tcp/%%ldap_server_address/%%ldap_port; do sleep 1; done'
ExecStartPost=-/usr/bin/timeout 10 bash -c 'while ! /usr/local/lib/sbin/interne_well_known.pl > /var/www/html/.well-known/openid-configuration/int; do sleep 1; done' ExecStartPost=-/usr/bin/timeout 10 bash -c 'while ! /usr/local/lib/sbin/interne_well_known.pl > /var/www/html/.well-known/openid-configuration/int; do sleep 1; done'
ExecStartPost=-/bin/bash -c '/usr/local/lib/sbin/interne_well_known.pl no > /var/www/html/.well-known/openid-configuration/ext' ExecStartPost=-/bin/bash -c '/usr/local/lib/sbin/interne_well_known.pl no > /var/www/html/.well-known/openid-configuration/ext'

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Postorius WSGI Service Description=Postorius WSGI Service
After=postgresqlclient.service After=risotto.target
[Service] [Service]
%for %%domain in %%mailman_domains %for %%domain in %%mailman_domains

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Postorius WSGI Service Description=Postorius WSGI Service
After=network.target postgresqlclient.service After=risotto.target
[Service] [Service]
Type=notify Type=notify

View file

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10"> <rougail version="0.10">
<services> <services>
<service name="mariadbclient" target="multi-user" engine="creole"/> <service name="mariadbclient" target="risotto" engine="creole"/>
</services> </services>
<variables> <variables>
<family name="mariadb" description="MariaDB"> <family name="mariadb" description="MariaDB">

View file

@ -1,6 +1,7 @@
[Unit] [Unit]
Description=Waiting for mariadb server Description=Waiting for mariadb server
Before=network.target After=network-online.target
Before=risotto.target
[Service] [Service]
Type=oneshot Type=oneshot

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Nextcloud management Description=Nextcloud management
After=postgresqlclient.service After=risotto.target
Before=apache.service php-fpm.service Before=apache.service php-fpm.service
[Service] [Service]

View file

@ -1,2 +1,2 @@
[Unit] [Unit]
After=network.target After=risotto.target

View file

@ -1,5 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10"> <rougail version="0.10">
<services>
<service name="oauth2-client" target="risotto" engine="creole"/>
</services>
<variables> <variables>
<family name="oauth2_client" description="OAuth2 client"> <family name="oauth2_client" description="OAuth2 client">
<variable name="oauth2_client_server_domainname" type="domainname" description="OAuth2 server domain name" mandatory='True' supplier="OAuth2"/> <variable name="oauth2_client_server_domainname" type="domainname" description="OAuth2 server domain name" mandatory='True' supplier="OAuth2"/>

View file

@ -0,0 +1 @@
PKG="$PKG curl"

View file

@ -0,0 +1,7 @@
[Unit]
After=network-online.target
Before=risotto.target
[Service]
Type=oneshot
ExecStart=/usr/bin/timeout 90 bash -c 'while ! [ "$(/usr/bin/curl --write-out '%{http_code}' --silent --output /dev/null https://%%oauth2_client_server_domainname/.well-known/openid-configuration)" = 200 ]; do sleep 1; done;'

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Piwigo management Description=Piwigo management
After=mariadbclient.service After=risotto.target
Before=nginx.service php-fpm.service Before=nginx.service php-fpm.service
[Service] [Service]

View file

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10"> <rougail version="0.10">
<services> <services>
<service name="postgresqlclient" target="multi-user" engine="creole"> <service name="postgresqlclient" target="risotto" engine="creole">
<file mode="400">/secrets/postgresql.pass</file> <file mode="400">/secrets/postgresql.pass</file>
<file>/etc/pki/ca-trust/source/anchors/ca_PostgreSQL.crt</file> <file>/etc/pki/ca-trust/source/anchors/ca_PostgreSQL.crt</file>
<file>/etc/pki/tls/certs/postgresql.crt</file> <file>/etc/pki/tls/certs/postgresql.crt</file>

View file

@ -1,6 +1,7 @@
[Unit] [Unit]
Description=Waiting for postgresql server Description=Waiting for postgresql server
Before=network.target After=network-online.target
Before=risotto.target
[Service] [Service]
Type=oneshot Type=oneshot

View file

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Roundcube database init Description=Roundcube database init
After=postgresqlclient.service After=risotto.target
Before=nginx.service php-fpm.service Before=nginx.service php-fpm.service
[Service] [Service]

View file

@ -29,6 +29,7 @@
<file>/secrets/root.pwd</file> <file>/secrets/root.pwd</file>
<file engine="none">/tmpfiles.d/risotto-volatile.conf</file> <file engine="none">/tmpfiles.d/risotto-volatile.conf</file>
</service> </service>
<service name="risotto" target="multi-user" type="target" engine="none"/>
</services> </services>
<variables> <variables>
<variable name='root_password' type="password" description="Mot de passe de l'administrateur système root" auto_save='False' mandatory="True"/> <variable name='root_password' type="password" description="Mot de passe de l'administrateur système root" auto_save='False' mandatory="True"/>

View file

@ -0,0 +1,5 @@
[Unit]
Description=Waiting for all dependencies
Before=multi-user.target
After=network-online.target
Wants=network-online.target