From 1ed780482744f6fa0f32deacb835ff68397f1d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 22:58:37 +0200 Subject: [PATCH] fix --- conf/systemd.service | 2 +- manifest.toml | 2 +- scripts/install | 8 ++++---- scripts/upgrade | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 8207fb1..317badd 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/live/ -ExecStart=__INSTALL_DIR__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__PORT_TURN__ -udp-range 49152-65535 -groups __DATA_DIR__/groups -recordings __DATA_DIR__/recordings -data __INSTALL_DIR__/live/data/ +ExecStart=__INSTALL_DIR__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__PORT_TURN__ -udp-range 49152-65535 -groups __DATA_DIR__/groups -recordings __DATA_DIR__/recordings -data __INSTALL_DIR__/data/ LimitNOFILE=65536 # Sandboxing options to harden security diff --git a/manifest.toml b/manifest.toml index a250a75..67a21b7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -80,7 +80,7 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] - subdirs = ["groups", "recordings"] + subdirs = ["groups", "recordings", "data"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 2f31bab..f2b09b9 100755 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir/build" ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" -mkdir -p "$install_dir/live/data" +mkdir -p "$install_dir/live" mkdir -p "$install_dir/live_ldap/data" cp -r "$install_dir/build/static/" "$install_dir/live/" @@ -93,9 +93,9 @@ password_hash=$(echo $($install_dir/galene-password-generator $password)) ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" -chmod 400 "$install_dir/live/data/config.json" -chown $app:$app "$install_dir/live/data/config.json" +ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json" +chmod 400 "$data_dir/data/config.json" +chown $app:$app "$data_dir/data/config.json" # Configure Galène LDAP key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') diff --git a/scripts/upgrade b/scripts/upgrade index 0e05f93..98c006d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,9 +116,9 @@ if [ -z "${password_hash:-}" ]; then ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" fi # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" -chmod 400 "$install_dir/live/data/config.json" -chown $app:$app "$install_dir/live/data/config.json" +#ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json" +#chmod 400 "$data_dir/data/config.json" +#chown $app:$app "$data_dir/data/config.json" # Configure Galène LDAP # If key doesn't exist, create it @@ -131,9 +131,9 @@ chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" -chmod 400 "$data_dir/groups/$group_name.json" -chown $app:$app "$data_dir/groups/$group_name.json" +#ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +#chmod 400 "$data_dir/groups/$group_name.json" +#chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json"