1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
* Cleaning up
This commit is contained in:
Éric Gaspar 2021-03-23 22:49:51 +01:00 committed by GitHub
parent a44a6cdddc
commit e6e321fe1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 31 deletions

View file

@ -6,7 +6,7 @@
"en": "Videoconferencing server that is easy to deploy",
"fr": "Serveur de visioconférence facile à déployer"
},
"version": "0.3.2~ynh2",
"version": "0.3.2~ynh3",
"url": "https://galene.org/",
"license": "MIT",
"maintainer": {
@ -14,7 +14,7 @@
"email": ""
},
"requirements": {
"yunohost": ">= 4.0.8"
"yunohost": ">= 4.1.7"
},
"multi_instance": false,
"services": [
@ -25,28 +25,16 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for Galène",
"fr": "Choisissez un nom de domaine pour Galène"
},
"example": "example.com"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez l'administrateur"
},
"example": "johndoe"
},
{
"name": "password",
"type": "password",
"ask": {
"en": "Set the administrator password",
"fr": "Définissez le mot de passe administrateur"
},
"help": {
"en": "Set the administrator password (between 8 and 30 characters)",
"fr": "Définissez le mot de passe administrateur (entre 8 et 30 caractères)"
@ -56,10 +44,6 @@
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"help": {
"en": "If enabled, Galène will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Galène sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -153,12 +153,24 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
mkdir -p /var/log/$app
mkdir -p /etc/$app
# Create systemd service for turnserver
cp ../conf/coturn/default_coturn /etc/default/coturn-$app
ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
# Setup logrotate
ynh_use_logrotate --logfile "/var/log/$app"
#=================================================
# SET COTURN CONFIG
#=================================================
@ -211,13 +223,6 @@ ynh_store_file_checksum --file="$final_path/groups/$group_name.json"
ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json"
ynh_store_file_checksum --file="$final_path/data/ice-servers.json"
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
ynh_use_logrotate --logfile "/var/log/$app"
#=================================================
# ADD SCRIPT FOR COTURN CRON AND APP SERVICE
#=================================================
@ -236,9 +241,8 @@ chmod +x $final_path/Coturn_config_rotate.sh
#=================================================
# Set permissions to app files
chown -R $app:$app $final_path
chown -R $app: $final_path
chmod -R 755 $final_path
chown -R $app:root /var/log/$app
chown -R $app:root /etc/$app
chown turnserver:root /etc/$app/coturn.conf
chmod -R u=rwX,g=rX,o= /etc/$app

View file

@ -21,7 +21,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
password=$(ynh_app_setting_get --app=$app --key=password)
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
port=$(ynh_app_setting_get --app=$app --key=port)
turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port)
turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd)
@ -50,6 +49,13 @@ if [ -z "$turnserver_port" ]; then
ynh_exec_warn_less yunohost firewall allow Both $turnserver_port
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -244,9 +250,9 @@ ynh_add_systemd_config
#=================================================
# Set permissions on app files
chown -R $app:$app $final_path
chown -R $app: $final_path
chmod -R 755 $final_path
chown -R $app:root /var/log/$app
chown -R $app /var/log/$app
chown -R $app:root /etc/$app
chown turnserver:root $coturn_config_path
chmod -R u=rwX,g=rX,o= /etc/$app