mirror of
https://github.com/YunoHost-Apps/phpbb_ynh.git
synced 2024-09-03 19:56:36 +02:00
commit
8ed7c117ce
15 changed files with 267 additions and 42 deletions
55
.github/ISSUE_TEMPLATE.md
vendored
Executable file
55
.github/ISSUE_TEMPLATE.md
vendored
Executable file
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**How to post a meaningful bug report**
|
||||||
|
1. *Read this whole template first.*
|
||||||
|
2. *Determine if you are on the right place:*
|
||||||
|
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
|
||||||
|
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
|
||||||
|
- *When in doubt, post here and we will figure it out together.*
|
||||||
|
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||||
|
---
|
||||||
|
|
||||||
|
### Describe the bug
|
||||||
|
|
||||||
|
*A clear and concise description of what the bug is.*
|
||||||
|
|
||||||
|
### Context
|
||||||
|
|
||||||
|
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
|
||||||
|
- YunoHost version: x.x.x
|
||||||
|
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
|
||||||
|
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
|
||||||
|
- If yes, please explain:
|
||||||
|
- Using, or trying to install package version/branch:
|
||||||
|
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
|
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||||
|
```sh
|
||||||
|
sudo yunohost app install the_app
|
||||||
|
```
|
||||||
|
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
||||||
|
- *If the error occurs in your browser, explain what you did:*
|
||||||
|
1. *Go to '...'*
|
||||||
|
2. *Click on '...'*
|
||||||
|
3. *Scroll down to '...'*
|
||||||
|
4. *See error*
|
||||||
|
|
||||||
|
### Expected behavior
|
||||||
|
|
||||||
|
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
|
||||||
|
|
||||||
|
### Logs
|
||||||
|
|
||||||
|
*When an operation fails, YunoHost provides a simple way to share the logs.*
|
||||||
|
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
|
||||||
|
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
|
||||||
|
|
||||||
|
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
|
||||||
|
|
||||||
|
*If applicable and useful, add screenshots to help explain your problem.*
|
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Executable file
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
- *And how do you fix that problem*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
|
||||||
|
- [ ] Code finished and ready to be reviewed/tested
|
||||||
|
- [ ] The fix/enhancement were manually tested (if applicable)
|
||||||
|
|
||||||
|
## Automatic tests
|
||||||
|
|
||||||
|
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
|
142
.github/workflows/updater.sh
vendored
Executable file
142
.github/workflows/updater.sh
vendored
Executable file
|
@ -0,0 +1,142 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PACKAGE UPDATING HELPER
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# This script is meant to be run by GitHub Actions
|
||||||
|
# The YunoHost-Apps organisation offers a template Action to run this script periodically
|
||||||
|
# Since each app is different, maintainers can adapt its contents so as to perform
|
||||||
|
# automatic actions when a new upstream release is detected.
|
||||||
|
|
||||||
|
# Remove this exit command when you are ready to run this Action
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# FETCHING LATEST RELEASE AND ITS ASSETS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Fetching information
|
||||||
|
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
||||||
|
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
||||||
|
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
||||||
|
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
|
||||||
|
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
||||||
|
|
||||||
|
# Later down the script, we assume the version has only digits and dots
|
||||||
|
# Sometimes the release name starts with a "v", so let's filter it out.
|
||||||
|
# You may need more tweaks here if the upstream repository has different naming conventions.
|
||||||
|
if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
||||||
|
version=${version:1}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setting up the environment variables
|
||||||
|
echo "Current version: $current_version"
|
||||||
|
echo "Latest release from upstream: $version"
|
||||||
|
echo "VERSION=$version" >> $GITHUB_ENV
|
||||||
|
# For the time being, let's assume the script will fail
|
||||||
|
echo "PROCEED=false" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# Proceed only if the retrieved version is greater than the current one
|
||||||
|
if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then
|
||||||
|
echo "::warning ::No new version available"
|
||||||
|
exit 0
|
||||||
|
# Proceed only if a PR for this new version does not already exist
|
||||||
|
elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then
|
||||||
|
echo "::warning ::A branch already exists for this update"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.)
|
||||||
|
echo "${#assets[@]} available asset(s)"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPDATE SOURCE FILES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Here we use the $assets variable to get the resources published in the upstream release.
|
||||||
|
# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like.
|
||||||
|
|
||||||
|
# Let's loop over the array of assets URLs
|
||||||
|
for asset_url in ${assets[@]}; do
|
||||||
|
|
||||||
|
echo "Handling asset at $asset_url"
|
||||||
|
|
||||||
|
# Assign the asset to a source file in conf/ directory
|
||||||
|
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
|
||||||
|
# Leave $src empty to ignore the asset
|
||||||
|
case $asset_url in
|
||||||
|
*"phpBB-"*".zip"*)
|
||||||
|
src="app"
|
||||||
|
;;
|
||||||
|
*"v"*".zip"*)
|
||||||
|
src="fr"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If $src is not empty, let's process the asset
|
||||||
|
if [ ! -z "$src" ]; then
|
||||||
|
|
||||||
|
# Create the temporary directory
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
|
|
||||||
|
# Download sources and calculate checksum
|
||||||
|
filename=${asset_url##*/}
|
||||||
|
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
|
||||||
|
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
||||||
|
|
||||||
|
# Delete temporary directory
|
||||||
|
rm -rf $tempdir
|
||||||
|
|
||||||
|
# Get extension
|
||||||
|
if [[ $filename == *.tar.gz ]]; then
|
||||||
|
extension=tar.gz
|
||||||
|
else
|
||||||
|
extension=${filename##*.}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rewrite source file
|
||||||
|
cat <<EOT > conf/$src.src
|
||||||
|
SOURCE_URL=$asset_url
|
||||||
|
SOURCE_SUM=$checksum
|
||||||
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
SOURCE_FORMAT=zip
|
||||||
|
SOURCE_IN_SUBDIR=true
|
||||||
|
SOURCE_EXTRACT=true
|
||||||
|
EOT
|
||||||
|
|
||||||
|
cat <<EOT > conf/fr.src
|
||||||
|
SOURCE_URL=$asset_url
|
||||||
|
SOURCE_SUM=$checksum
|
||||||
|
SOURCE_FORMAT=zip
|
||||||
|
SOURCE_IN_SUBDIR=true
|
||||||
|
SOURCE_FILENAME=phpbb-language.zip
|
||||||
|
SOURCE_EXTRACT=true
|
||||||
|
EOT
|
||||||
|
echo "... conf/$src.src updated"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "... asset ignored"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SPECIFIC UPDATE STEPS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Any action on the app's source code can be done.
|
||||||
|
# The GitHub Action workflow takes care of committing all changes after this script ends.
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALIZATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Replace new version in manifest
|
||||||
|
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
|
||||||
|
|
||||||
|
# No need to update the README, yunohost-bot takes care of it
|
||||||
|
|
||||||
|
# The Action will proceed only if the PROCEED environment variable is set to true
|
||||||
|
echo "PROCEED=true" >> $GITHUB_ENV
|
||||||
|
exit 0
|
|
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website. With an extensive database of user-created extensions and styles database containing hundreds of style and image packages to customise your board, you can create a very unique forum in minutes.
|
phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website. With an extensive database of user-created extensions and styles database containing hundreds of style and image packages to customise your board, you can create a very unique forum in minutes.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 3.3.4~ynh3
|
**Shipped version:** 3.3.5~ynh1
|
||||||
|
|
||||||
**Demo:** https://www.phpbb.com/demo/
|
**Demo:** https://www.phpbb.com/demo/
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ phpBB is a free flat-forum bulletin board software solution that can be used to
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: http://www.phpbb.com/
|
* Official app website: http://www.phpbb.com/
|
||||||
* Official user documentation: https://yunohost.org/apps
|
|
||||||
* Official admin documentation: https://www.phpbb.com/support/docs/
|
* Official admin documentation: https://www.phpbb.com/support/docs/
|
||||||
* Upstream app code repository: https://github.com/phpbb/phpbb
|
* Upstream app code repository: https://github.com/phpbb/phpbb
|
||||||
* YunoHost documentation for this app: https://yunohost.org/app_phpbb
|
* YunoHost documentation for this app: https://yunohost.org/app_phpbb
|
||||||
|
|
|
@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website. With an extensive database of user-created extensions and styles database containing hundreds of style and image packages to customise your board, you can create a very unique forum in minutes.
|
phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website. With an extensive database of user-created extensions and styles database containing hundreds of style and image packages to customise your board, you can create a very unique forum in minutes.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 3.3.4~ynh3
|
**Version incluse :** 3.3.5~ynh1
|
||||||
|
|
||||||
**Démo :** https://www.phpbb.com/demo/
|
**Démo :** https://www.phpbb.com/demo/
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ phpBB is a free flat-forum bulletin board software solution that can be used to
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l'app : http://www.phpbb.com/
|
* Site officiel de l'app : http://www.phpbb.com/
|
||||||
* Documentation officielle utilisateur : https://yunohost.org/apps
|
|
||||||
* Documentation officielle de l'admin : https://www.phpbb.com/support/docs/
|
* Documentation officielle de l'admin : https://www.phpbb.com/support/docs/
|
||||||
* Dépôt de code officiel de l'app : https://github.com/phpbb/phpbb
|
* Dépôt de code officiel de l'app : https://github.com/phpbb/phpbb
|
||||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_phpbb
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_phpbb
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#upgrade=1 from_commit=CommitHash
|
upgrade=1 from_commit=28f03211e7354cd7a1e34ec379e06e4bda25fbeb
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
change_url=1
|
change_url=1
|
||||||
|
@ -22,6 +22,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=CommitHash
|
; commit=28f03211e7354cd7a1e34ec379e06e4bda25fbeb
|
||||||
name=Name and date of the commit.
|
name=Merge pull request #7
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
SOURCE_URL=https://download.phpbb.com/pub/release/3.3/3.3.4/phpBB-3.3.4.zip
|
SOURCE_URL=https://download.phpbb.com/pub/release/3.3/3.3.5/phpBB-3.3.5.zip
|
||||||
SOURCE_SUM=7fea067567f8190ed5c84645bf535da0dca547f6c116c543bac33940824773a8
|
SOURCE_SUM=983d60881fab3139bbcbe9182dcaaa1d2e9c6fb80fef682a0b28785ee22d05dd
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
|
||||||
SOURCE_EXTRACT=true
|
SOURCE_EXTRACT=true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
SOURCE_URL=https://github.com/qiaeru/phpbb-language-fr/archive/refs/tags/v4.4.0.zip
|
SOURCE_URL=https://github.com/qiaeru/phpbb-language-fr/archive/refs/tags/v4.5.0.zip
|
||||||
SOURCE_SUM=c3a655a36ca7ce97ccae927850c2b4f1e1d2734558f2e08ca94bbf05e50aaafb
|
SOURCE_SUM=a959ab84d60c99cabb9353adcc2e24d9f597669c8832e6fa31afebc3cafb1b5e
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=phpbb-language-fr-4.4.0.zip
|
SOURCE_FILENAME=phpbb-language.zip
|
||||||
SOURCE_EXTRACT=true
|
SOURCE_EXTRACT=true
|
||||||
|
|
|
@ -4,11 +4,6 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/ ;
|
alias __FINALPATH__/ ;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
# phpBB uses index.htm
|
# phpBB uses index.htm
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,13 @@
|
||||||
"en": "Forum software that is easy to use, powerful, and highly customisable",
|
"en": "Forum software that is easy to use, powerful, and highly customisable",
|
||||||
"fr": "Forum facile à utiliser, puissant et hautement personnalisable"
|
"fr": "Forum facile à utiliser, puissant et hautement personnalisable"
|
||||||
},
|
},
|
||||||
"version": "3.3.4~ynh3",
|
"version": "3.3.5~ynh1",
|
||||||
"url": "http://www.phpbb.com/",
|
"url": "http://www.phpbb.com/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "GPL-2.0-only",
|
"license": "GPL-2.0-only",
|
||||||
"website": "http://www.phpbb.com/",
|
"website": "http://www.phpbb.com/",
|
||||||
"demo": "https://www.phpbb.com/demo/",
|
"demo": "https://www.phpbb.com/demo/",
|
||||||
"admindoc": "https://www.phpbb.com/support/docs/",
|
"admindoc": "https://www.phpbb.com/support/docs/",
|
||||||
"userdoc": "https://yunohost.org/apps",
|
|
||||||
"code": "https://github.com/phpbb/phpbb"
|
"code": "https://github.com/phpbb/phpbb"
|
||||||
},
|
},
|
||||||
"license": "GPL-2.0-only",
|
"license": "GPL-2.0-only",
|
||||||
|
@ -22,7 +21,7 @@
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="7.3"
|
||||||
|
|
||||||
extra_php_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-bcmath"
|
pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-bcmath"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -50,6 +50,13 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -121,15 +128,12 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=4
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP APPLICATION WITH CLI
|
# SETUP APPLICATION WITH CLI
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Configuring the APP..." --weight=1
|
ynh_script_progression --message="Configuring the APP..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="$YNH_APP_BASEDIR/conf/install-config.yml.default" --destination="$final_path/install/install-config.yml"
|
ynh_add_config --template="../conf/install-config.yml.default" --destination="$final_path/install/install-config.yml"
|
||||||
|
|
||||||
ynh_exec_as "$app" php${phpversion} "$final_path/install/phpbbcli.php" -q --no-interaction install "$final_path/install/install-config.yml"
|
ynh_exec_as "$app" php${phpversion} "$final_path/install/phpbbcli.php" -q --no-interaction install "$final_path/install/install-config.yml"
|
||||||
|
|
||||||
|
@ -138,11 +142,11 @@ mv "$final_path/install" "$final_path/install_old"
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CRON JOB
|
# ADD A CRON JOB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Setuping a cron..." --weight=1
|
||||||
|
|
||||||
cron_path="/etc/cron.d/$app"
|
ynh_add_config --template="../conf/phpbb.cron" --destination="/etc/cron.d/$app"
|
||||||
ynh_add_config --template="../conf/phpbb.cron" --destination="$cron_path"
|
chown root: "/etc/cron.d/$app"
|
||||||
chown root: "$cron_path"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
chmod 644 "$cron_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -30,6 +30,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||||
|
|
||||||
|
# Remove metapackage and its dependencies
|
||||||
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -74,6 +74,14 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REINSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||||
|
|
||||||
|
# Define and install dependencies
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -38,12 +38,6 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
if [ -n "$new_phpbb_dir" ]; then
|
|
||||||
ynh_secure_remove --file="$new_phpbb_dir"
|
|
||||||
fi
|
|
||||||
if [ -n "$old_phpbb_dir" ]; then
|
|
||||||
ynh_secure_remove --file="$old_phpbb_dir"
|
|
||||||
fi
|
|
||||||
# Restore it if the upgrade fails
|
# Restore it if the upgrade fails
|
||||||
ynh_restore_upgradebackup
|
ynh_restore_upgradebackup
|
||||||
}
|
}
|
||||||
|
@ -117,6 +111,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -130,20 +131,20 @@ ynh_add_fpm_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading the APP..." --weight=1
|
ynh_script_progression --message="Upgrading the APP..." --weight=1
|
||||||
|
|
||||||
ynh_exec_as "$app" php${phpversion} "$final_path/bin/phpbbcli.php" -q --no-interaction db:migrate
|
ynh_exec_as "$app" php${phpversion} "$final_path/bin/phpbbcli.php" --no-interaction db:migrate --safe-mode
|
||||||
|
|
||||||
if [ -e "$final_path/install" ]; then
|
if [ -e "$final_path/install" ]; then
|
||||||
mv "$final_path/install" "$final_path/install_old"
|
mv "$final_path/install" "$final_path/install_old"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CRON JOB
|
# SETUP A CRON
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Setuping a cron..." --weight=1
|
||||||
|
|
||||||
cron_path="/etc/cron.d/$app"
|
ynh_add_config --template="../conf/phpbb.cron" --destination="/etc/cron.d/$app"
|
||||||
ynh_add_config --template="../conf/phpbb.cron" --destination="$cron_path"
|
chown root: "/etc/cron.d/$app"
|
||||||
chown root: "$cron_path"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
chmod 644 "$cron_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue