mirror of
https://github.com/YunoHost-Apps/phpipam_ynh.git
synced 2024-09-03 19:56:39 +02:00
Update install
This commit is contained in:
parent
5295bffed4
commit
cf9c80e473
1 changed files with 14 additions and 14 deletions
|
@ -51,20 +51,20 @@ final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
|
|
||||||
# Normalize the url path syntax
|
# Normalize the url path syntax
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
path_url=$(ynh_normalize_url_path "$path_url")
|
||||||
|
|
||||||
# Check web path availability
|
# Check web path availability
|
||||||
ynh_webpath_available $domain $path_url
|
ynh_webpath_available "$domain" "$path_url"
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register $app $domain $path_url
|
ynh_webpath_register "$app" "$domain" "$path_url"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set "$app" domain "$domain"
|
||||||
ynh_app_setting_set $app path $path_url
|
ynh_app_setting_set "$app" path "$path_url"
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set "$app" is_public "$is_public"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
|
@ -96,15 +96,15 @@ ynh_print_info "Creating a MySQL database..."
|
||||||
### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script
|
### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script
|
||||||
### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script
|
### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid $app)
|
db_name=$(ynh_sanitize_dbid "$app")
|
||||||
ynh_app_setting_set $app db_name $db_name
|
ynh_app_setting_set "$app" db_name "$db_name"
|
||||||
ynh_mysql_setup_db $db_name $db_name
|
ynh_mysql_setup_db "$db_name" "$db_name"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set "$app" final_path "$final_path"
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create $app
|
ynh_system_user_create "$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cp -a ../conf/config.dist.php $final_path/config.php
|
cp -a ../conf/config.dist.php "$final_path"/config.php
|
||||||
|
|
||||||
ynh_replace_string "yunouser" "$db_name" "$final_path/config.php"
|
ynh_replace_string "yunouser" "$db_name" "$final_path/config.php"
|
||||||
ynh_replace_string "yunopass" "$db_pwd" "$final_path/config.php"
|
ynh_replace_string "yunopass" "$db_pwd" "$final_path/config.php"
|
||||||
|
@ -154,14 +154,14 @@ ynh_replace_string "yunobase" "$db_name" "$final_path/config.php"
|
||||||
### that really need such authorization.
|
### that really need such authorization.
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R www-data:www-data $final_path
|
chown -R www-data: "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# If app is public, add url to SSOWat conf as skipped_uris
|
# If app is public, add url to SSOWat conf as skipped_uris
|
||||||
if [ $is_public -eq 1 ]; then
|
if [ "$is_public" -eq 1 ]; then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue