From 1805251664f2ed155b04e6f6594e21bb50b98c96 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Mon, 20 Apr 2020 10:53:16 +0530 Subject: [PATCH 1/7] Forgot to updated addon sources and updated readme, manifest --- README.md | 27 ++++++++++++++++++++++----- check_process | 2 +- conf/addons.src | 4 ++-- manifest.json | 4 ++-- pull_request_template.md | 18 ++++++++++++++++++ 5 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 pull_request_template.md diff --git a/README.md b/README.md index 072513d..cb7adce 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # Friendica social network for YunoHost -[![Integration level](https://dash.yunohost.org/integration/friendica.svg)](https://ci-apps.yunohost.org/jenkins/job/friendica%20%28Community%29/lastBuild/consoleFull) +[![Integration level](https://dash.yunohost.org/integration/friendica.svg)](https://dash.yunohost.org/appci/app/friendica) [![Install Friendica with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=friendica) +> *This package allow you to install Friendica quickly and simply on a YunoHost server. +If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* + [Friendica](http://friendi.ca/) integration for YunoHost
**Version:2020.03**

@@ -19,7 +22,10 @@ Before installing, read the [Friendica installation instructions](https://github - SSL certificate validation requirement (now with support for [Let's Encrypt!](https://letsencrypt.org)). See Installation section below. - Dedicated domain (must install under web root like **https://hub.example.com/** not **https://example.com/hub/** ) -Note:You can use accounts from YunoHost's LDAP. There are not yet active SSO.

+#### Multi-users support + +LDAP auth supported. There are not yet active SSO. +

# To-do - [ ] Fail2Ban support @@ -30,9 +36,6 @@ Before installing, read the [Friendica installation instructions](https://github ### Register a new domain and add it to YunoHost Friendica requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**. As Friendica uses the full domain and is installed on the root, you can create a subdomain such as friendica.domain.tld. Don't forget to update your DNS if you manage them manually. -Friendica requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual. - - ### Install the Friendica application Use the YunoHost admin panel to install Friendica by entering the GitHub repo address in the custom app URL @@ -42,3 +45,17 @@ Make sure to select your domain from the previous section as the application dom After the installation,login with the username provided at the time of the installaion with your SSO password.You can then create your profile and access the admin panel from the button in the center of the top nav bar, just adjecent to the search bar.(The admin panel don't have text,so don't get confuse with it) Public users can register and use the instance as normal users. SSO users can login with there username and password as normal users too. + +Developers info +---------------- + +**Only if you want to use a testing branch for coding, instead of merging directly into master.** +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/friendica_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/friendica_ynh/tree/testing --debug +or +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/friendica_ynh/tree/testing --debug +``` + diff --git a/check_process b/check_process index 0726b57..eb9fe54 100644 --- a/check_process +++ b/check_process @@ -10,7 +10,7 @@ setup_private=0 setup_public=1 upgrade=1 - upgrade=1 from_commit=1c018b9ed379e25d5bcab4bd27e9833feee9da68 + upgrade=1 from_commit=3396188976f75170f2217fcc0e6c9b5f61f7b9e9 backup_restore=1 multi_instance=1 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. diff --git a/conf/addons.src b/conf/addons.src index 78d838c..9ce9c67 100644 --- a/conf/addons.src +++ b/conf/addons.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/friendica/friendica-addons/archive/2019.12.tar.gz -SOURCE_SUM=c206a8b0845a4a5102b5a9d1881d039472d734c70d5f1dd52e44684955b6a7f2 +SOURCE_URL=https://github.com/friendica/friendica-addons/archive/2020.03.tar.gz +SOURCE_SUM=937aa87bbe8a40ef78348387969e77ac0422d2ce8bd00579aaf4ce45ea1362da SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index af61b28..48d1380 100644 --- a/manifest.json +++ b/manifest.json @@ -8,13 +8,13 @@ }, "url": "http://friendi.ca", "license": "free", - "version": "2020.03", + "version": "2020.03-ynh2", "maintainer": { "name": "Anmol Sharma", "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": ">= 3.5" }, "previous_maintainers": { "name": "aymhce", diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000..0287f9f --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,18 @@ +## Problem +- *Description of why you made this PR* + +## Solution +- *And how do you fix that problem* + +## PR Status +- [ ] Code finished. +- [ ] Tested with Package_check. +- [ ] Fix or enhancement tested. +- [ ] Upgrade from last version tested. +- [ ] Can be reviewed and tested. + +## Package_check results +--- +*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* + +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/) From 24520f0641b6146675543def504e73ef45b5b0f8 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 23 Apr 2020 04:17:10 +0530 Subject: [PATCH 2/7] fix ldap and php version 7.0 --- conf/nginx.conf | 2 +- conf/php-fpm.conf | 108 ++++++++++++++++++++++++++++------------------ scripts/install | 4 +- 3 files changed, 70 insertions(+), 44 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5bb7945..45ea394 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -71,7 +71,7 @@ location __PATH__ { location ~* \.php$ { fastcgi_split_path_info ^(.+?\.php)(/.*)$; try_files $uri =404; - fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 57affa6..ab5dca9 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -1,10 +1,11 @@ ; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the +; the variable $pool can be used in any directive and will be replaced by the ; pool name ('www' here) [__NAMETOCHANGE__] ; Per pool prefix ; It only applies on the following directives: +; - 'access.log' ; - 'slowlog' ; - 'listen' (unixsocket) ; - 'chroot' @@ -24,28 +25,35 @@ group = __USER__ ; The address on which to accept FastCGI requests. ; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php5-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock -; Set listen(2) backlog. A value of '-1' means unlimited. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 128 +; Set listen(2) backlog. +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. +; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ; mode is set to 0660 listen.owner = www-data listen.group = www-data ;listen.mode = 0660 - -; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address ; must be separated by a comma. If this value is left blank, connections will be @@ -59,7 +67,13 @@ listen.group = www-data ; - The pool processes will inherit the master process priority ; unless it specified otherwise ; Default Value: no set -; priority = -19 +; process.priority = -19 + +; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user +; or group is differrent than the master process user. It allows to create process +; core dump and ptrace the process for the pool user. +; Default Value: no +; process.dumpable = yes ; Choose how the process manager will control the number of child processes. ; Possible Values: @@ -96,7 +110,7 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 10 +pm.max_children = 5 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' @@ -117,12 +131,12 @@ pm.max_spare_servers = 3 ; Note: Used only when pm is set to 'ondemand' ; Default Value: 10s ;pm.process_idle_timeout = 10s; - + ; The number of requests each child process should execute before respawning. ; This can be useful to work around memory leaks in 3rd party libraries. For ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; Default Value: 0 -pm.max_requests = 500 +;pm.max_requests = 500 ; The URI to view the FPM status page. If this value is not set, no URI will be ; recognized as a status page. It shows the following informations: @@ -170,7 +184,7 @@ pm.max_requests = 500 ; ; By default the status page only outputs short status. Passing 'full' in the ; query string will also return status for each pool process. -; Example: +; Example: ; http://www.foo.bar/status?full ; http://www.foo.bar/status?json&full ; http://www.foo.bar/status?html&full @@ -215,7 +229,7 @@ pm.max_requests = 500 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: ${prefix}/share/fpm/status.html +; It's available in: /usr/share/php/7.0/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it @@ -275,7 +289,7 @@ pm.max_requests = 500 ; - %{megabytes}M ; - %{mega}M ; %n: pool name -; %o: ouput header +; %o: output header ; it must be associated with embraces to specify the name of the header: ; - %{Content-Type}o ; - %{X-Powered-By}o @@ -283,7 +297,7 @@ pm.max_requests = 500 ; - .... ; %p: PID of the child that serviced the request ; %P: PID of the parent of the child that serviced the request -; %q: the query string +; %q: the query string ; %Q: the '?' character if query string exists ; %r: the request URI (without the query string, see %q and %Q) ; %R: remote IP address @@ -291,47 +305,51 @@ pm.max_requests = 500 ; %t: server time the request was received ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %T: time the log has been written (the request has finished) ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - + ; The log file for slow requests ; Default Value: not set ; Note: slowlog is mandatory if request_slowlog_timeout is set -slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log - +;slowlog = log/$pool.log.slow + ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 -request_slowlog_timeout = 5s - +;request_slowlog_timeout = 0 + ; The timeout for serving a single request after which the worker process will ; be killed. This option should be used when the 'max_execution_time' ini option ; does not stop script execution for some reason. A value of '0' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 request_terminate_timeout = 1d - + ; Set open file descriptor rlimit. ; Default Value: system defined value ;rlimit_files = 1024 - + ; Set max core size rlimit. ; Possible Values: 'unlimited' or an integer greater or equal to 0 ; Default Value: system defined value ;rlimit_core = 0 - + ; Chroot to this directory at the start. This value must be defined as an ; absolute path. When this value is not set, chroot is not used. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one ; of its subdirectories. If the pool prefix is not set, the global prefix ; will be used instead. -; Note: chrooting is a great security feature and should be used whenever +; Note: chrooting is a great security feature and should be used whenever ; possible. However, all PHP paths will be relative to the chroot ; (error_log, sessions.save_path, ...). ; Default Value: not set @@ -347,16 +365,25 @@ chdir = __FINALPATH__ ; Note: on highloaded environement, this can cause some delay in the page ; process time (several ms). ; Default Value: no -catch_workers_output = yes +;catch_workers_output = yes + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no ; Limits the extensions of the main script FPM will allow to parse. This can ; prevent configuration mistakes on the web server side. You should only limit ; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. +; execute php code. ; Note: set an empty value to allow all extensions. ; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - +;security.limit_extensions = .php .php3 .php4 .php5 .php7 + ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env @@ -370,7 +397,7 @@ catch_workers_output = yes ; overwrite the values previously defined in the php.ini. The directives are the ; same as the PHP SAPI: ; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. +; be overwritten from PHP call 'ini_set'. ; php_admin_value/php_admin_flag - these directives won't be overwritten by ; PHP call 'ini_set' ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. @@ -392,13 +419,12 @@ catch_workers_output = yes ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -; upload_max_filesize = 50M -; post_max_size = 50M -; mail.add_x_header = Off +; php_admin_value[upload_max_filesize] = 50M +; php_admin_value[post_max_size] = 50M +; php_admin_flag[mail.add_x_header] = Off ; Other common parameters -; max_execution_time = 600 -; max_input_time = 300 -; memory_limit = 256M -; short_open_tag = On - +; php_admin_value[max_execution_time] = 600 +; php_admin_value[max_input_time] = 300 +; php_admin_value[memory_limit] = 256M +; php_admin_flag[short_open_tag] = On diff --git a/scripts/install b/scripts/install index 700fc87..dee2fff 100644 --- a/scripts/install +++ b/scripts/install @@ -149,7 +149,7 @@ ynh_replace_string --match_string="mysqlusername" --replace_string="$db_nam ynh_replace_string --match_string="mysqldatabasename" --replace_string="$db_name" --target_file="$final_path/config/local.config.php" ynh_replace_string --match_string="mysqlpassword" --replace_string="$db_pwd" --target_file="$final_path/config/local.config.php" ynh_replace_string --match_string="'admin_email' => ''," --replace_string="'admin_email' => '$admin_mail'," --target_file="$final_path/config/local.config.php" -ynh_replace_string --match_string="REGISTER_OPEN" --replace_string="REGISTER_CLOSED" --target_file="$final_path/config/local.config.php" +ynh_replace_string --match_string="OPEN" --replace_string="CLOSED" --target_file="$final_path/config/local.config.php" # init db @@ -210,7 +210,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer (cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo bin/console config system addon ldapauth) - +ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO `addon` (`id`, `name`, `version`, `installed`, `hidden`, `timestamp`, `plugin_admin`) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0');" chown -R $app: $final_path #================================================= From ccc5ba1fb51acdd60386c2b5176594e69a73e50f Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 23 Apr 2020 04:30:59 +0530 Subject: [PATCH 3/7] fix mysql --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index dee2fff..21ea4d3 100644 --- a/scripts/install +++ b/scripts/install @@ -210,7 +210,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer (cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo bin/console config system addon ldapauth) -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO `addon` (`id`, `name`, `version`, `installed`, `hidden`, `timestamp`, `plugin_admin`) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0');" +ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< INSERT INTO `addon` (`id`, `name`, `version`, `installed`, `hidden`, `timestamp`, `plugin_admin`) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0'); chown -R $app: $final_path #================================================= From 87ab7677eb2c873ff4cbf350b654559f6d90fd98 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 23 Apr 2020 04:48:14 +0530 Subject: [PATCH 4/7] fix mysql_2 --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 21ea4d3..6317dbf 100644 --- a/scripts/install +++ b/scripts/install @@ -210,7 +210,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer (cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo bin/console config system addon ldapauth) -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< INSERT INTO `addon` (`id`, `name`, `version`, `installed`, `hidden`, `timestamp`, `plugin_admin`) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0'); +ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0');" chown -R $app: $final_path #================================================= From c4baf754a07912d605a3ec5afc136438d28ffdb0 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 23 Apr 2020 17:16:17 +0530 Subject: [PATCH 5/7] fix mysql_3 --- scripts/install | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 6317dbf..8a52d4c 100644 --- a/scripts/install +++ b/scripts/install @@ -210,9 +210,14 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer (cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo bin/console config system addon ldapauth) -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', '1', '0');" +ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" << EOF +REPLACE INTO `addon` SET +`name` = 'ldapauth', +`installed` = 1, +`timestamp` = UNIX_TIMESTAMP(), +`plugin_admin` = 0; +EOF chown -R $app: $final_path - #================================================= # SETUP SSOWAT #================================================= From cde0452df5ca87454ec6de99886701be432671a9 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 23 Apr 2020 22:23:35 +0530 Subject: [PATCH 6/7] fix mysql_4 --- scripts/install | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 8a52d4c..a29b22e 100644 --- a/scripts/install +++ b/scripts/install @@ -210,13 +210,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer (cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo bin/console config system addon ldapauth) -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" << EOF -REPLACE INTO `addon` SET -`name` = 'ldapauth', -`installed` = 1, -`timestamp` = UNIX_TIMESTAMP(), -`plugin_admin` = 0; -EOF +ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');" chown -R $app: $final_path #================================================= # SETUP SSOWAT From 7084c324f075bd0e8322c251d1b5dcb88b9d69f2 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Fri, 24 Apr 2020 01:05:23 +0530 Subject: [PATCH 7/7] Removed logrotate --- scripts/restore | 6 ------ scripts/upgrade | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index a4af90e..971f179 100644 --- a/scripts/restore +++ b/scripts/restore @@ -106,12 +106,6 @@ ynh_restore_file "/etc/cron.d/$app" chown -R $app: $final_path -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - # unprotected_uris allows SSO credentials to be passed anyway. ynh_app_setting_set $app unprotected_uris "/" diff --git a/scripts/upgrade b/scripts/upgrade index f4a7511..792e153 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,7 +117,7 @@ ynh_replace_string --match_string="mysqlusername" --replace_string="$db_nam ynh_replace_string --match_string="mysqldatabasename" --replace_string="$db_name" --target_file="$final_path/config/local.config.php" ynh_replace_string --match_string="mysqlpassword" --replace_string="$db_pwd" --target_file= "$final_path/config/local.config.php" ynh_replace_string --match_string="'admin_email' => ''," --replace_string="'admin_email' => '$admin_mail'," --target_file="$final_path/config/local.config.php" -ynh_replace_string --match_string="REGISTER_OPEN" --replace_string="REGISTER_CLOSED" --target_file="$final_path/config/local.config.php" +ynh_replace_string --match_string="OPEN" --replace_string="CLOSED" --target_file="$final_path/config/local.config.php" #Copy Addons