kaz-vagrant/files/snster-kaz/isp-a/home/provision.sh

40 lines
1.2 KiB
Bash
Raw Normal View History

2022-12-22 17:35:23 +01:00
#!/bin/bash
# ISP-A infra
set -e
if [ -z $SNSTERGUARD ] ; then exit 1; fi
2022-12-22 17:35:23 +01:00
DIR=`dirname $0`
cd `dirname $0`
# les scripts de créations de BAL pour clawsmail
cp -ar "clawsmail" /
chmod +x /clawsmail/addclawsuser.sh
chmod +x /clawsmail/genpasswd
#client pour tester la messagerie
DEBIAN_FRONTEND=noninteractive apt-get install -y claws-mail
2022-12-23 13:50:27 +01:00
# On configure les comptes mail
2022-12-22 17:35:23 +01:00
if [ -f /clawsmail/addclawsuser.sh ]; then
2023-05-17 15:49:43 +02:00
su debian /clawsmail/addclawsuser.sh contact1 kaz.sns contact1@kaz.sns tototototo 1
su debian /clawsmail/addclawsuser.sh contact2 kaz.sns contact2@kaz.sns tototototo 2
su debian /clawsmail/addclawsuser.sh contact3 kaz.sns contact3@kaz.sns tototototo 3
su debian /clawsmail/addclawsuser.sh contact4 kaz.sns contact4@kaz.sns tototototo 4
su debian /clawsmail/addclawsuser.sh email isp-a.sns email email 5
2022-12-23 13:50:27 +01:00
fi
# On place les certifs
2023-05-26 11:36:05 +02:00
if [ -f tls/root_ca.crt ]; then
cp -ar tls/root_ca.crt /usr/local/share/ca-certificates/
2022-12-23 13:50:27 +01:00
/usr/sbin/update-ca-certificates --fresh
2022-12-22 17:35:23 +01:00
fi
2022-12-23 15:15:49 +01:00
# Add to Firefox store
echo -e '{
"policies": {
"Certificates": {
"ImportEnterpriseRoots": true,
2023-05-26 11:36:05 +02:00
"Install": ["/etc/ssl/certs/root_ca.pem"]
2022-12-23 15:15:49 +01:00
}
}
}' > /usr/lib/firefox-esr/distribution/policies.json