mirror of
https://github.com/YunoHost-Apps/squid3_ynh.git
synced 2024-09-03 20:26:11 +02:00
Added message in upgrade and restart service in install
This commit is contained in:
parent
5fe9410a0a
commit
028e92158d
4 changed files with 49 additions and 35 deletions
|
@ -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. Under **No Proxy for** enter this **localhost, 127.0.0.1**.
|
||||||
1. **Save and restart** the Firefox.
|
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
|
## 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/
|
Thanks to **Fred** to write the instruction to configure Squid for Yunohost. French: https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/
|
||||||
|
|
|
@ -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
|
### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script
|
||||||
|
|
||||||
# Start a systemd service
|
# 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
|
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.
|
Enter these value in the below feilds.
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
| Http proxy: Your any registered domain name or ip eg domain.tld
|
| Http proxy: Your any registered domain name or ip eg domain.tld
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|port: $port
|
|port: $port
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|Tick mark use this proxy server for all protocols
|
|Tick mark use this proxy server for all protocols
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|No proxy for: localhost, 127.0.0.1
|
|No proxy for: localhost, 127.0.0.1
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|Save and restart borwser.
|
|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
|
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
|
||||||
|
|
|
@ -92,15 +92,21 @@ To configure on Firefox go to preferences->general->network proxy->manual proxy
|
||||||
Enter these value in the below feilds.
|
Enter these value in the below feilds.
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
| Http proxy: Your any registered domain name or ip eg domain.tld
|
| Http proxy: Your any registered domain name or ip eg domain.tld
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|port: $port
|
|port: $port
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|Tick mark use this proxy server for all protocols
|
|Tick mark use this proxy server for all protocols
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|No proxy for: localhost, 127.0.0.1
|
|No proxy for: localhost, 127.0.0.1
|
||||||
|--------------------------------------------------------------------
|
|
|
||||||
|Save and restart borwser.
|
|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
|
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"
|
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
|
||||||
|
|
|
@ -16,22 +16,10 @@ source /usr/share/yunohost/helpers
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
port=$(ynh_app_setting_get $app port)
|
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
|
# 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
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
|
@ -42,24 +30,13 @@ 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
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# 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
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
ynh_script_progression --message="Upgrading dependencies..." -
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
@ -126,3 +103,34 @@ yunohost service add squid3 --log "/var/log/$squid/access.log"
|
||||||
|
|
||||||
service $squid restart
|
service $squid restart
|
||||||
yunohost app ssowatconf
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue