mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
Update, cleanup
This commit is contained in:
parent
133de8d19d
commit
386490336a
1 changed files with 10 additions and 20 deletions
|
@ -28,6 +28,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
# 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 --source_id="main" --dest_dir="$install_dir"
|
ynh_setup_source --source_id="main" --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
chmod 750 "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PREPARE AND INSTALL APP
|
# PREPARE AND INSTALL APP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -52,7 +54,6 @@ ynh_use_logrotate --logfile="$install_dir/documents/dolibarr.log"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP APPLICATION WITH CURL
|
# SETUP APPLICATION WITH CURL
|
||||||
#=================================================
|
#=================================================
|
||||||
# Installation with curl
|
|
||||||
ynh_script_progression --message="Configuring $app ..." --weight=1
|
ynh_script_progression --message="Configuring $app ..." --weight=1
|
||||||
|
|
||||||
# Create necessary files
|
# Create necessary files
|
||||||
|
@ -61,25 +62,20 @@ touch "$install_dir/htdocs/conf/conf.php"
|
||||||
# Set right permissions for curl install
|
# Set right permissions for curl install
|
||||||
chown -R "$app:" "$install_dir"
|
chown -R "$app:" "$install_dir"
|
||||||
|
|
||||||
ynh_script_progression --message="Generate fileconf" --weight=1
|
|
||||||
ynh_local_curl "/install/fileconf.php" "testpost=ok"
|
ynh_local_curl "/install/fileconf.php" "testpost=ok"
|
||||||
ynh_exec_fully_quiet sleep 5
|
ynh_exec_fully_quiet sleep 5
|
||||||
|
|
||||||
ynh_script_progression --message="installation - step 1" --weight=3
|
|
||||||
ynh_local_curl "/install/step1.php" "testpost=ok" "action=set"
|
ynh_local_curl "/install/step1.php" "testpost=ok" "action=set"
|
||||||
ynh_exec_fully_quiet sleep 5
|
ynh_exec_fully_quiet sleep 5
|
||||||
|
|
||||||
ynh_script_progression --message="installation - step 2 (may take a while)..." --weight=72
|
|
||||||
ynh_local_curl "/install/step2.php" "testpost=ok" "action=set"
|
ynh_local_curl "/install/step2.php" "testpost=ok" "action=set"
|
||||||
ynh_exec_fully_quiet sleep 5
|
ynh_exec_fully_quiet sleep 5
|
||||||
|
|
||||||
ynh_script_progression --message="installation - step 4" --weight=3
|
|
||||||
ynh_local_curl "/install/step4.php" "testpost=ok" "action=set"
|
ynh_local_curl "/install/step4.php" "testpost=ok" "action=set"
|
||||||
ynh_exec_fully_quiet sleep 5
|
ynh_exec_fully_quiet sleep 5
|
||||||
|
|
||||||
# Generate a random password for the admin user (will be ignored because of LDAP)
|
# Generate a random password for the admin user (will be ignored because of LDAP)
|
||||||
password=$(ynh_string_random 8)
|
password=$(ynh_string_random 8)
|
||||||
ynh_script_progression --message="installation - step 5" --weight=4
|
|
||||||
ynh_local_curl "/install/step5.php" "testpost=ok" "action=set" "pass=$password" "pass_verif=$password"
|
ynh_local_curl "/install/step5.php" "testpost=ok" "action=set" "pass=$password" "pass_verif=$password"
|
||||||
ynh_exec_fully_quiet sleep 5
|
ynh_exec_fully_quiet sleep 5
|
||||||
|
|
||||||
|
@ -99,6 +95,13 @@ if [ ! -f "$install_dir/documents/install.lock" ]; then
|
||||||
chmod 440 "$install_dir/documents/install.lock"
|
chmod 440 "$install_dir/documents/install.lock"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod -R o-rwx "$install_dir"
|
||||||
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
|
mkdir -p "$install_dir/documents"
|
||||||
|
chown -R "$app:" "$install_dir/documents"
|
||||||
|
chmod go-w "$install_dir/documents"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LDAP
|
# SETUP LDAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -116,19 +119,6 @@ else
|
||||||
ynh_print_info --message="LDAP user update ended with error"
|
ynh_print_info --message="LDAP user update ended with error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1
|
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
chown -R "$app:www-data" "$install_dir"
|
|
||||||
|
|
||||||
mkdir -p "$install_dir/documents"
|
|
||||||
chown -R "$app:" "$install_dir/documents"
|
|
||||||
chmod go-w "$install_dir/documents"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue