Make it launch

This commit is contained in:
Norbi Peti 2024-05-25 03:19:34 +02:00
parent c5532bd4fb
commit e9e4ca9762
2 changed files with 11 additions and 3 deletions

View file

@ -3,6 +3,10 @@ packaging_format = 2
id = "snikket"
name = "Snikket"
description.en = "Chat that is simple, secure, and private"
# TODO: post_cert_update hook to steal certs
# TODO: Deal with /var/www/snikket
# TODO: Remove cert check (and import certs)
# TODO: Paths are all wrong
version = "2024.02.21~ynh1"
@ -33,7 +37,9 @@ ram.runtime = "50M"
# this is a generic question - ask strings are automatically handled by YunoHost's core
type = "domain"
[install.admin]
type = "user"
type = "email"
ask.en = "Administrator E-mail"
help.en = "Provide an E-mail address where users can contact you"
[resources]
[resources.sources.main]

View file

@ -65,6 +65,7 @@ ynh_app_setting_set --app=$app --key=config_path --value=$config_path
mkdir -p $config_path
mkdir -p $config_path/{certs,conf.avail,conf.d}
mkdir -p $config_path/firewall
sed -i -e 's#/snikket/prosody#/var/lib/snikket#g' "$snikketdir/ansible/files/prosody.cfg.lua"
ynh_add_config --template="$snikketdir/ansible/files/prosody.cfg.lua" --destination="$config_path/prosody.cfg.lua"
ynh_add_config --template="$snikketdir/ansible/files/restricted_users.pfw" --destination="$config_path/restricted_users.pfw"
@ -102,10 +103,11 @@ done < "../sources/snikket-modules.txt"
#=================================================
ynh_script_progression --message="Updating Snikket configuration..."
# TODO: The admin email won't work for subdomains
# TODO: The TURN server should be set up as well
cat >/etc/snikket/environment <<EOF
SNIKKET_DOMAIN=${domain}
SNIKKET_ADMIN_EMAIL=${admin}@${domain}
SNIKKET_ADMIN_EMAIL=${admin}
SNIKKET_TWEAK_TURNSERVER=0
EOF
#=================================================