From fae09f9979928b5a55abef9b853d152f188590f2 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 | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 1bc60de..4d918fe 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/ -static __INSTALL_DIR__/live/static +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/ -static __INSTALL_DIR__/live/static LimitNOFILE=65536 # Sandboxing options to harden security diff --git a/manifest.toml b/manifest.toml index f87808b..b00ca26 100644 --- a/manifest.toml +++ b/manifest.toml @@ -82,7 +82,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 0a2fcf1..32620d9 100755 --- a/scripts/install +++ b/scripts/install @@ -35,7 +35,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/" @@ -84,9 +84,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="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="config.json" --destination="$install_dir/data/config.json" +chmod 400 "$install_dir/data/config.json" +chown $app:$app "$install_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 5bf9c01..df78577 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,7 +50,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=2 ynh_setup_source --dest_dir="$install_dir/build" --full_replace=1 ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" --full_replace=1 -mkdir -p "$install_dir/live/data" +mkdir -p "$install_dir/data" mkdir -p "$install_dir/live_ldap/data" ynh_secure_remove --file="$install_dir/live/static/" @@ -100,9 +100,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="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="config.json" --destination="$install_dir/data/config.json" +# chmod 400 "$install_dir/data/config.json" +# chown $app:$app "$install_dir/data/config.json" # Configure Galène LDAP # If key doesn't exist, create it @@ -115,9 +115,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="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="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="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json"