[fix] Run yunohost hook + create the CA at package installation

This commit is contained in:
kload 2015-10-01 17:34:30 -04:00
parent 21d1aa72d4
commit 6411d0e08e
3 changed files with 9 additions and 2 deletions

View file

@ -7,6 +7,10 @@ cd /usr/share/yunohost/templates/yunohost
sudo mkdir -p /etc/yunohost
if [ ! -f /etc/yunohost/current_host ]; then
echo "yunohost.org" | sudo tee /etc/yunohost/current_host
fi
if [ ! -f /etc/yunohost/firewall.yml ]; then
sudo cp firewall.yml /etc/yunohost/firewall.yml
fi

View file

@ -29,8 +29,10 @@ if [ ! -f $ssl_dir/serial ]; then
echo "01" | sudo tee $ssl_dir/serial
fi
if [ ! -f /etc/yunohost/current_host ]; then
echo "yunohost.org" | sudo tee /etc/yunohost/current_host
if [ ! -f /etc/yunohost/certs/yunohost.org/ca.pem ]; then
sudo openssl req -x509 -new -config $ssl_dir/openssl.cnf \
-days 3650 -out $ssl_dir/ca/cacert.pem \
-keyout $ssl_dir/ca/cakey.pem -nodes -batch
fi
if [ ! -f /etc/yunohost/certs/yunohost.org/crt.pem ]; then

1
debian/postinst vendored
View file

@ -7,6 +7,7 @@ do_configure() {
service yunohost-api restart
if [ ! -f /etc/yunohost/installed ]; then
bash /usr/share/yunohost/hooks/conf_regen/01-yunohost
bash /usr/share/yunohost/hooks/conf_regen/02-ssl
bash /usr/share/yunohost/hooks/conf_regen/15-nginx
fi