From 700f81f3b19b3990f704483a01379cb7179376fc Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 24 Feb 2021 18:08:49 +0530 Subject: [PATCH 1/2] Fix: persmission issue --- README.md | 2 +- scripts/install | 1 + scripts/remove | 2 +- scripts/upgrade | 5 +++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4cb3f10..2743631 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Then why this package uses Docker? It's because the developers of the core app do not support simple installation. And packaging without documentaion is time consuming. -[![Integration level](https://dash.yunohost.org/integration/Lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg) [![Install Lemmy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy) diff --git a/scripts/install b/scripts/install index 91820db..a21dac2 100755 --- a/scripts/install +++ b/scripts/install @@ -148,6 +148,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # Run Lemmy through Docker #================================================= +chown -R $(whoami) /usr/local/bin cd "$final_path" && docker-compose up -d diff --git a/scripts/remove b/scripts/remove index 9dd5b1b..d8471bb 100755 --- a/scripts/remove +++ b/scripts/remove @@ -52,4 +52,4 @@ ynh_remove_nginx_config # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --time --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/upgrade b/scripts/upgrade index 5efe36f..a270797 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,7 +69,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config 'port_lemmy port_ui port_pictrs port_iframely' @@ -77,7 +77,7 @@ ynh_add_nginx_config 'port_lemmy port_ui port_pictrs port_iframely' #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 +ynh_script_progression --message="Upgrading dependencies..." --weight=1 #ynh_install_app_dependencies $pkg_dependencies @@ -121,6 +121,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # Run Lemmy through Docker #================================================= +chown -R $(whoami) /usr/local/bin cd "$final_path" && docker-compose up -d #================================================= From 546bf1c5e993a7e4fb2ec10c936d4761ab0bd4f5 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 24 Feb 2021 18:22:37 +0530 Subject: [PATCH 2/2] Fix: persmission issue --- scripts/install | 4 +++- scripts/restore | 3 +++ scripts/upgrade | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a21dac2..b02ed40 100755 --- a/scripts/install +++ b/scripts/install @@ -148,7 +148,9 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # Run Lemmy through Docker #================================================= -chown -R $(whoami) /usr/local/bin +# chown -R $(whoami) /usr/local/bin + +chmod +x /usr/local/bin/docker-compose cd "$final_path" && docker-compose up -d diff --git a/scripts/restore b/scripts/restore index 09470e6..a5fa025 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,9 @@ curl -L https://github.com/docker/compose/releases/download/${version}/docker-co #================================================= # Run Lemmy through Docker #================================================= +# chown -R $(whoami) /usr/local/bin + +chmod +x /usr/local/bin/docker-compose cd "$final_path" && docker-compose up -d #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a270797..b97d808 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,7 +121,8 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # Run Lemmy through Docker #================================================= -chown -R $(whoami) /usr/local/bin +#chown -R $(whoami) /usr/local/bin +chmod +x /usr/local/bin/docker-compose cd "$final_path" && docker-compose up -d #=================================================