diff --git a/scripts/change_url b/scripts/change_url index a401e68..3fefb36 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -49,14 +49,14 @@ chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" # Configure Galene LDAP -ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" -chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" -chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" +#ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +#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" diff --git a/scripts/install b/scripts/install index b67bbaa..893283f 100755 --- a/scripts/install +++ b/scripts/install @@ -38,6 +38,7 @@ ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" + cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" @@ -61,15 +62,19 @@ ynh_script_progression --message="Building app..." --weight=1 ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go + pushd $install_dir/build/galene-password-generator/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd + pushd $install_dir/build/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd + pushd $install_dir/build_ldap/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ popd + ynh_remove_go ynh_secure_remove --file="$install_dir/build/" ynh_secure_remove --file="$install_dir/build_ldap/" diff --git a/scripts/upgrade b/scripts/upgrade index 37e742c..0e05f93 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,8 +56,10 @@ ynh_script_progression --message="Upgrading source files..." --weight=2 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_ldap/data" + ynh_secure_remove --file="$install_dir/live/static/" cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html"