add hooks in debconf to create a special user to collect apache logs
This commit is contained in:
parent
dd470a87b7
commit
8ea0fcfde7
|
@ -164,6 +164,7 @@ db_input low alternc-slave/mysql/client || true
|
||||||
db_input low alternc-slave/sql/backup_type || true
|
db_input low alternc-slave/sql/backup_type || true
|
||||||
db_input low alternc-slave/sql/overwrite || true
|
db_input low alternc-slave/sql/overwrite || true
|
||||||
db_input low alternc-slave/monitor_ip || true
|
db_input low alternc-slave/monitor_ip || true
|
||||||
|
db_input low alternc-slave/mergelog-key || true
|
||||||
db_go
|
db_go
|
||||||
|
|
||||||
# vim: et sw=4
|
# vim: et sw=4
|
||||||
|
|
|
@ -43,6 +43,18 @@ case "$1" in
|
||||||
# ajoute l'user postfix au groupe sasl
|
# ajoute l'user postfix au groupe sasl
|
||||||
adduser --quiet postfix sasl
|
adduser --quiet postfix sasl
|
||||||
|
|
||||||
|
db_get "alternc-slave/mergelog-key"
|
||||||
|
if [ "X$ret" != "" ]; then
|
||||||
|
echo "Creating alternc-mergelog account"
|
||||||
|
adduser --quiet --system --home /var/run/alternc-mergelog --shell /bin/false --ingroup adm alternc-mergelog
|
||||||
|
if [ ! grep -q "$ret" /var/run/alternc-mergelog/.ssh/authorized_keys ]; then
|
||||||
|
mkdir -p /var/run/alternc-mergelog/.ssh
|
||||||
|
echo "$ret" >> /var/run/alternc-mergelog/.ssh/authorized_keys
|
||||||
|
chown -R alternc-mergelog:adm /var/run/alternc-mergelog/.ssh
|
||||||
|
chmod -R og-rwx /var/run/alternc-mergelog/.ssh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# corriger les permissions du chroot
|
# corriger les permissions du chroot
|
||||||
mkdir -p /var/spool/postfix/var/run/saslauthd || true
|
mkdir -p /var/spool/postfix/var/run/saslauthd || true
|
||||||
dpkg-statoverride --quiet --update --add root sasl 710 /var/spool/postfix/var/run/saslauthd || true
|
dpkg-statoverride --quiet --update --add root sasl 710 /var/spool/postfix/var/run/saslauthd || true
|
||||||
|
|
|
@ -176,3 +176,14 @@ Type: boolean
|
||||||
_Description: Should AlternC remove bind mailboxes ?
|
_Description: Should AlternC remove bind mailboxes ?
|
||||||
If you accept all users e-mails will be deleted
|
If you accept all users e-mails will be deleted
|
||||||
|
|
||||||
|
Template:alternc-slave/mergelog-key
|
||||||
|
Type: string
|
||||||
|
_Description: SSH key of the mergelog server:
|
||||||
|
|
||||||
|
The slave nodes can be configured to accept connexions from a central
|
||||||
|
server (the mergelog server) that will merge the apache logs from all
|
||||||
|
the slave servers.
|
||||||
|
.
|
||||||
|
To do this, the server needs to have an account created and a public
|
||||||
|
key. Enter the public key here and the account will be created. If
|
||||||
|
this field is left empty, no account will be created.
|
||||||
|
|
Loading…
Reference in New Issue