1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Put commenting at right palce

This commit is contained in:
anmol26s 2018-09-28 21:55:44 +05:30
parent fd4c0d92a4
commit 82bbdef4d7

View file

@ -35,7 +35,12 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path $path_url)
# Add Dependencies # Add Dependencies
ynh_install_app_dependencies 'php-mbstring|base-files(<<9.0)' php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' ynh_install_app_dependencies 'php-mbstring|base-files(<<9.0)' php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)'
@ -52,7 +57,11 @@ fi
# 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"
# Copy config file for correct place
cp -f "/var/www/$app/config/local-sample.ini.php" "/var/www/$app/config/local.ini.php" cp -f "/var/www/$app/config/local-sample.ini.php" "/var/www/$app/config/local.ini.php"
# Replace strings in config file
ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/config/local.ini.php" ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/config/local.ini.php"
ynh_replace_string "mysqlusername" "$db_name" "$final_path/config/local.ini.php" ynh_replace_string "mysqlusername" "$db_name" "$final_path/config/local.ini.php"
ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/config/local.ini.php" ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/config/local.ini.php"
@ -60,13 +69,6 @@ ynh_replace_string "mysqlpassword" "$db_pwd" "$final_path
ynh_replace_string "admin_email =" "admin_email = $admin_mail" "$final_path/config/local.ini.php" ynh_replace_string "admin_email =" "admin_email = $admin_mail" "$final_path/config/local.ini.php"
ynh_replace_string "register_policy = REGISTER_OPEN" "register_policy = REGISTER_CLOSED" "$final_path/config/local.ini.php" ynh_replace_string "register_policy = REGISTER_OPEN" "register_policy = REGISTER_CLOSED" "$final_path/config/local.ini.php"
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path $path_url)
#Copy Addons #Copy Addons
rm -Rf "$final_path/addon" rm -Rf "$final_path/addon"
@ -87,7 +89,6 @@ chown -R $app: $final_path
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
# configure friendica
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
@ -101,7 +102,7 @@ ynh_backup_if_checksum_is_different "$final_path/config/local.ini.php"
# Recalculate and store the config file checksum into the app settings # Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/config/local.ini.php" ynh_store_file_checksum "$final_path/config/local.ini.php"
# Set up poller # Set up cron job
ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron
ynh_replace_string "__USER__" "$app" ../conf/poller-cron ynh_replace_string "__USER__" "$app" ../conf/poller-cron
sudo cp ../conf/poller-cron /etc/cron.d/$app sudo cp ../conf/poller-cron /etc/cron.d/$app