1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
This commit is contained in:
Éric Gaspar 2023-05-15 22:58:37 +02:00
parent ad760b0630
commit 1ed7804827
4 changed files with 12 additions and 12 deletions

View file

@ -8,7 +8,7 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/live/ 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 LimitNOFILE=65536
# Sandboxing options to harden security # Sandboxing options to harden security

View file

@ -80,7 +80,7 @@ ram.runtime = "50M"
[resources.install_dir] [resources.install_dir]
[resources.data_dir] [resources.data_dir]
subdirs = ["groups", "recordings"] subdirs = ["groups", "recordings", "data"]
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"

View file

@ -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"
ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" 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" mkdir -p "$install_dir/live_ldap/data"
cp -r "$install_dir/build/static/" "$install_dir/live/" 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" ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
# Configure Galène # Configure Galène
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json"
chmod 400 "$install_dir/live/data/config.json" chmod 400 "$data_dir/data/config.json"
chown $app:$app "$install_dir/live/data/config.json" chown $app:$app "$data_dir/data/config.json"
# Configure Galène LDAP # Configure Galène LDAP
key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}')

View file

@ -116,9 +116,9 @@ if [ -z "${password_hash:-}" ]; then
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
fi fi
# Configure Galène # Configure Galène
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" #ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json"
chmod 400 "$install_dir/live/data/config.json" #chmod 400 "$data_dir/data/config.json"
chown $app:$app "$install_dir/live/data/config.json" #chown $app:$app "$data_dir/data/config.json"
# Configure Galène LDAP # Configure Galène LDAP
# If key doesn't exist, create it # 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" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json"
# Create a group name config # Create a group name config
ynh_add_config --template="../conf/groupname.json" --destination="$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" #chmod 400 "$data_dir/groups/$group_name.json"
chown $app:$app "$data_dir/groups/$group_name.json" #chown $app:$app "$data_dir/groups/$group_name.json"
# Create a group name authenticated on LDAP # Create a group name authenticated on LDAP
ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json"