diff --git a/README.md b/README.md index ee49f5e..573b101 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It r 1. Under **No Proxy for** enter this **localhost, 127.0.0.1**. 1. **Save and restart** the Firefox. -**If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme** +If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme ## Special Thanks Thanks to **Fred** to write the instruction to configure Squid for Yunohost. French: https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/ diff --git a/scripts/install b/scripts/install index 45051e6..20653cb 100755 --- a/scripts/install +++ b/scripts/install @@ -165,7 +165,7 @@ ynh_script_progression --message="Starting a systemd service..." ### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script # Start a systemd service -ynh_systemd_action --service_name=$squid --action="start" --log_path="/var/log/$squid/access.log" +ynh_systemd_action --service_name=$squid --action="restart" --log_path="/var/log/$squid/access.log" yunohost app ssowatconf @@ -181,13 +181,13 @@ To configure on Firefox go to preferences->general->network proxy->manual proxy Enter these value in the below feilds. --------------------------------------------------------------------- | Http proxy: Your any registered domain name or ip eg domain.tld -|-------------------------------------------------------------------- +| |port: $port -|-------------------------------------------------------------------- +| |Tick mark use this proxy server for all protocols -|-------------------------------------------------------------------- +| |No proxy for: localhost, 127.0.0.1 -|-------------------------------------------------------------------- +| |Save and restart borwser. --------------------------------------------------------------------- If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send diff --git a/scripts/restore b/scripts/restore index da3a5e1..814ae6e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -92,15 +92,21 @@ To configure on Firefox go to preferences->general->network proxy->manual proxy Enter these value in the below feilds. --------------------------------------------------------------------- | Http proxy: Your any registered domain name or ip eg domain.tld -|-------------------------------------------------------------------- +| |port: $port -|-------------------------------------------------------------------- +| |Tick mark use this proxy server for all protocols -|-------------------------------------------------------------------- +| |No proxy for: localhost, 127.0.0.1 -|-------------------------------------------------------------------- +| |Save and restart borwser. --------------------------------------------------------------------- If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send ynh_send_readme_to_admin --app_message="mail_to_send" --type="install" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Restoration completed for $app" --time --last diff --git a/scripts/upgrade b/scripts/upgrade index 4f9d1a5..3765af5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,22 +16,10 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME port=$(ynh_app_setting_get $app port) -#================================================= -# CHECK VERSION -#================================================= - -### This helper will compare the version of the currently installed app and the version of the upstream package. -### $upgrade_type can have 2 different values -### - UPGRADE_APP if the upstream app version has changed -### - UPGRADE_PACKAGE if only the YunoHost package has changed -### ynh_check_app_version_changed will stop the upgrade if the app is up to date. -### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -42,24 +30,13 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --time --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" -fi #================================================= # SPECIFIC RESTORATION #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 +ynh_script_progression --message="Upgrading dependencies..." - ynh_install_app_dependencies $pkg_dependencies @@ -126,3 +103,34 @@ yunohost service add squid3 --log "/var/log/$squid/access.log" service $squid restart yunohost app ssowatconf + +#================================================= +# SEND A README FOR THE ADMIN +#================================================= + +echo "You can find a config file at /etc/$squid/squid.conf +Squid 3 will work with your registered users through LDAP. Just put the username and password when asked. + +To configure on Firefox go to preferences->general->network proxy->manual proxy configuration. + +Enter these value in the below feilds. +--------------------------------------------------------------------- +| Http proxy: Your any registered domain name or ip eg domain.tld +| +|port: $port +| +|Tick mark use this proxy server for all protocols +| +|No proxy for: localhost, 127.0.0.1 +| +|Save and restart borwser. +--------------------------------------------------------------------- +If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send + +ynh_send_readme_to_admin --app_message="mail_to_send" --type="install" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Upgrade of $app completed" --time --last