mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
Password generator (#109)
* fix * Update install * Update install * Update install * Update install * Update manifest.toml * Update install * Update manifest.toml * fix * Update install * fix * fix
This commit is contained in:
parent
88fcefa25b
commit
6fa519f35d
5 changed files with 18 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"canonicalHost": "__DOMAIN__",
|
||||
"admin":[{"username":"__ADMIN__","password":"__PASSWORD__"}]
|
||||
"admin":[{"username":"__ADMIN__", "password":__PASSWORD_HASH__}]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"op": [{"username": "__ADMIN__", "password": "__PASSWORD__"}],
|
||||
"op": [{"username": "__ADMIN__", "password": __PASSWORD_HASH__}],
|
||||
"presenter": [{}],
|
||||
"description": "__GROUP_DESCRIPTION__",
|
||||
"public": true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Galène: Videoconferencing server
|
||||
Description=Galène: videoconferencing server
|
||||
Documentation=https://galene.org
|
||||
After=network.target
|
||||
|
||||
|
|
|
@ -14,17 +14,7 @@ source /usr/share/yunohost/helpers
|
|||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
#group_name=$YNH_APP_ARG_GROUP_NAME
|
||||
#group_description=$YNH_APP_ARG_GROUP_DESCRIPTION
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=4
|
||||
|
||||
#ynh_app_setting_set --app=$app --key=group_name --value="$group_name"
|
||||
#ynh_app_setting_set --app=$app --key=group_description --value="$group_description"
|
||||
ynh_app_setting_set --app=$app --key=password --value="$password"
|
||||
|
||||
#=================================================
|
||||
|
@ -71,6 +61,9 @@ 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
|
||||
|
@ -84,6 +77,8 @@ ynh_secure_remove --file="$install_dir/.cache/"
|
|||
ynh_secure_remove --file="$install_dir/go/"
|
||||
ynh_secure_remove --file="$install_dir/.go-version"
|
||||
|
||||
chmod +x "$install_dir/galene-password-generator"
|
||||
|
||||
#=================================================
|
||||
# CREATE DATA DIRECTORY
|
||||
#=================================================
|
||||
|
@ -100,6 +95,8 @@ chown -R $app:www-data "$data_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
||||
|
||||
# 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"
|
||||
|
|
|
@ -13,10 +13,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
|
||||
group_description=$(ynh_app_setting_get --app=$app --key=group_description)
|
||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
|
||||
#=================================================
|
||||
|
@ -67,7 +64,7 @@ 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"
|
||||
#REMOVEME? ynh_secure_remove --file="$install_dir/live/static/"
|
||||
ynh_secure_remove --file="$install_dir/live/static/"
|
||||
cp -r "$install_dir/build/static/" "$install_dir/live/"
|
||||
ynh_replace_string --match_string="<div class=\"galene-header\">Galène</div>" --replace_string="<div class=\"galene-header\" onclick=\"location.href=window.location.origin\" style=\"cursor:pointer\">Galène</div>" --target_file="$install_dir/live/static/galene.html"
|
||||
|
||||
|
@ -93,6 +90,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
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
|
||||
|
@ -105,6 +105,8 @@ then
|
|||
ynh_secure_remove --file="$install_dir/.cache/"
|
||||
ynh_secure_remove --file="$install_dir/go/"
|
||||
ynh_secure_remove --file="$install_dir/.go-version"
|
||||
|
||||
chmod +x "$install_dir/galene-password-generator"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -112,6 +114,8 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
||||
|
||||
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
||||
|
||||
# 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"
|
||||
|
|
Loading…
Reference in a new issue