mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Run yunohost hook + create the CA at package installation
This commit is contained in:
parent
21d1aa72d4
commit
6411d0e08e
3 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
1
debian/postinst
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue