mirror of
https://github.com/YunoHost-Apps/dokuwiki_ynh.git
synced 2024-09-03 18:26:20 +02:00
Normalization from example_ynh
This commit is contained in:
parent
191a74e3e4
commit
c4ae1aacd0
12 changed files with 137 additions and 232 deletions
116
README.md
116
README.md
|
@ -1,12 +1,14 @@
|
|||
# DokuWiki for YunoHost - [English Version]
|
||||
# DokuWiki for YunoHost
|
||||
|
||||
[](https://ci-apps-dev.yunohost.org/jenkins/job/dokuwiki%20%28Official%29/lastBuild/consoleFull)
|
||||
[](https://dash.yunohost.org/appci/app/dokuwiki)
|
||||
[](https://install-app.yunohost.org/?app=dokuwiki)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install DokuWiki 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.*
|
||||
|
||||
## What is DokuWiki?
|
||||
## Overview
|
||||
|
||||
DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator's favorite. Built in access controls and authentication connectors make DokuWiki especially useful in the enterprise context and the large number of plugins contributed by its vibrant community allow for a broad range of use cases beyond a traditional wiki.
|
||||
|
||||
|
@ -16,10 +18,16 @@ DokuWiki is a simple to use and highly versatile Open Source wiki software that
|
|||
|
||||

|
||||
|
||||
## Demo
|
||||
|
||||
* [YunoHost demo](https://demo.yunohost.org/dokuwiki/)
|
||||
|
||||
## Configuration
|
||||
|
||||
## Documentation
|
||||
|
||||
* Official documentation: https://www.dokuwiki.org/manual
|
||||
* YunoHost documentation: There is no dedicated documentation, feel free [to contribute](https://yunohost.org/#/app_dokuwiki)
|
||||
* YunoHost documentation: https://yunohost.org/#/app_dokuwiki
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
|
@ -30,14 +38,22 @@ DokuWiki is a simple to use and highly versatile Open Source wiki software that
|
|||
|
||||
### Supported architectures
|
||||
|
||||
* x86-64b - 
|
||||
* ARMv8-A - 
|
||||
* Jessie x86-64b - 
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/dokuwiki/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/dokuwiki/)
|
||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/dokuwiki/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Cannot create or login with dokuwiki internal users, only users from Yunohost (Work needed for [authchained plugin](https://www.dokuwiki.org/plugin:authchained))
|
||||
|
||||
## Additional information
|
||||
|
||||
### Changelog
|
||||
|
||||
* *Many missing - List taken from previous documentation*
|
||||
* 07 Mar 2017 - Update app
|
||||
* 11 Feb 2017 - Create script app
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/dokuwiki_ynh/issues
|
||||
|
@ -58,89 +74,3 @@ sudo yunohost app install https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/tes
|
|||
or
|
||||
sudo yunohost app upgrade dokuwiki -u https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### _Testing Branch_
|
||||
|
||||
* 1 Aug 2018 [#37](https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/37) - Upgrade DokuWiki to version "Greebo 2018-04-22a" and rework of the Yunohost package
|
||||
|
||||
### _Master branch (Official release)_
|
||||
* *Many missing - List taken from previous documentation*
|
||||
* 07 Mar 2017 - Update app
|
||||
* 11 Feb 2017 - Create script app
|
||||
|
||||
|
||||
|
||||
------------------
|
||||
------------------
|
||||
|
||||
|
||||
|
||||
# Dokuwiki pour YunoHost - [Version Française]
|
||||
|
||||
[](https://ci-apps-dev.yunohost.org/jenkins/job/dokuwiki%20%28Official%29/lastBuild/consoleFull)
|
||||
[](https://install-app.yunohost.org/?app=dokuwiki)
|
||||
|
||||
## Dokuwiki, c'est quoi ?
|
||||
|
||||
DokuWiki est un logiciel wiki Open Source simple à utiliser et très polyvalent qui ne nécessite pas de base de données. Il est apprécié par les utilisateurs pour sa syntaxe propre et lisible. La facilité de maintenance, de sauvegarde et d'intégration en fait un favori d'administrateur. Des contrôles d'accès et des connecteurs d'authentification intégrés rendent DokuWiki particulièrement utile dans le contexte de l'entreprise et le grand nombre de plugins apportés par sa communauté dynamique permettent un large éventail de cas d'utilisation au-delà d'un wiki traditionnel.
|
||||
|
||||
**Version actuelle:** 2018-04-22a "Greebo"
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||
|
||||
## Documentation
|
||||
|
||||
* Documentation officielle : https://www.dokuwiki.org/manual
|
||||
* Documentation YunoHost : Pas de documentation dédiée, merci de [contribuer](https://yunohost.org/#/app_dokuwiki_fr) si vous le pouvez
|
||||
|
||||
## Fonctionnalités spécifiques YunoHost
|
||||
|
||||
* Fonctionne avec les utilisateurs YunoHost ainsi que le SSO - i.e. button de déconnexion
|
||||
* Définit un utilisateur "administrateur" lors de l'installation
|
||||
* Droits d'édition par défaut du wiki définis en lecture seule afin que les invités ne puissent éditer les pages. (Nécessaire surtout lorsque le wiki est public pour éviter le spam et le vandalisme. Peut être changé depuis la partie administration du wiki)
|
||||
* Lors de la mise à jour, les plugins officiels sont également mis à jour. Nous vous recommandons toutefois de vérifier le bon fonctionnement des plugins dans le panneau d'administration après cette opération. Nous ne pouvons pas savoir si des plugins spéciaux posent problèmes...
|
||||
|
||||
### Architectures matérielles supportées
|
||||
* x86-64b - 
|
||||
* ARMv8-A - 
|
||||
* Jessie x86-64b - 
|
||||
|
||||
## Limitations
|
||||
|
||||
* Impossible d'ajouter et d'utiliser les utilisateurs internes de DokuWiki, seulement ceux de Yunohost (travail nécessaire pour [authchained plugin](https://www.dokuwiki.org/plugin:authchained))
|
||||
|
||||
## Liens
|
||||
|
||||
* Déclarer un bogue: https://github.com/YunoHost-Apps/dokuwiki_ynh/issues
|
||||
* Site officiel: https://www.dokuwiki.org
|
||||
* Site YunoHost: https://yunohost.org
|
||||
|
||||
---
|
||||
|
||||
## Informations pour développeurs et développeuses
|
||||
|
||||
**Si vous savez ce que vous faites ET que vous souhaitez passer sur une version instable pour tester ou coder**
|
||||
|
||||
Au lieu de fusionner directement dans `master`, merci d'envoyer vos "pull request" dans la [branche de test `testing`](https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing)
|
||||
|
||||
Pour basculer sur la branche `testing`, merci de procéder ainsi:
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade dokuwiki -u https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
## Historique des versions
|
||||
|
||||
### _Testing Branch_
|
||||
|
||||
* 1 Aug 2018 [#37](https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/37) - Mise à jour de DokuWiki vers la version "Greebo 2018-04-22a" et rénovation du paquet Yunohost
|
||||
|
||||
### _Master branch (Official release)_
|
||||
* *Many missing - List taken from previous documentation*
|
||||
* 07 Mar 2017 - Update app
|
||||
* 11 Feb 2017 - Create script app
|
||||
|
|
76
README_fr.md
Normal file
76
README_fr.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
# Dokuwiki pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/dokuwiki)
|
||||
[](https://install-app.yunohost.org/?app=dokuwiki)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Dokuwiki rapidement et simplement sur un serveur Yunohost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
DokuWiki est un logiciel wiki Open Source simple à utiliser et très polyvalent qui ne nécessite pas de base de données. Il est apprécié par les utilisateurs pour sa syntaxe propre et lisible. La facilité de maintenance, de sauvegarde et d'intégration en fait un favori d'administrateur. Des contrôles d'accès et des connecteurs d'authentification intégrés rendent DokuWiki particulièrement utile dans le contexte de l'entreprise et le grand nombre de plugins apportés par sa communauté dynamique permettent un large éventail de cas d'utilisation au-delà d'un wiki traditionnel.
|
||||
|
||||
**Version incluse:** 2018-04-22a "Greebo"
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||
|
||||
## Démo
|
||||
|
||||
* [Démo YunoHost](https://demo.yunohost.org/dokuwiki/)
|
||||
|
||||
## Configuration
|
||||
|
||||
## Documentation
|
||||
|
||||
* Documentation officielle: https://www.dokuwiki.org/manual
|
||||
* Documentation YunoHost: https://yunohost.org/#/app_dokuwiki
|
||||
|
||||
## Caractéristiques spécifiques YunoHost
|
||||
|
||||
* Fonctionne avec les utilisateurs YunoHost ainsi que le SSO - i.e. button de déconnexion
|
||||
* Définit un utilisateur "administrateur" lors de l'installation
|
||||
* Droits d'édition par défaut du wiki définis en lecture seule afin que les invités ne puissent éditer les pages. (Nécessaire surtout lorsque le wiki est public pour éviter le spam et le vandalisme. Peut être changé depuis la partie administration du wiki)
|
||||
* Lors de la mise à jour, les plugins officiels sont également mis à jour. Nous vous recommandons toutefois de vérifier le bon fonctionnement des plugins dans le panneau d'administration après cette opération. Nous ne pouvons pas savoir si des plugins spéciaux posent problèmes...
|
||||
|
||||
### Architectures matérielles supportées
|
||||
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/dokuwiki/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/dokuwiki/)
|
||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/dokuwiki/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Impossible d'ajouter et d'utiliser les utilisateurs internes de DokuWiki, seulement ceux de Yunohost (travail nécessaire pour [authchained plugin](https://www.dokuwiki.org/plugin:authchained))
|
||||
|
||||
## Informations additionnelles
|
||||
|
||||
### Historique des versions
|
||||
|
||||
* *Many missing - List taken from previous documentation*
|
||||
* 07 Mar 2017 - Update app
|
||||
* 11 Feb 2017 - Create script app
|
||||
|
||||
## Liens
|
||||
|
||||
* Signaler un bug: https://github.com/YunoHost-Apps/dokuwiki_ynh/issues
|
||||
* Site de l'application:https://www.dokuwiki.org
|
||||
* Site web YunoHost: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade dokuwiki -u https://github.com/YunoHost-Apps/dokuwiki_ynh/tree/testing --debug
|
||||
```
|
|
@ -1,8 +1,3 @@
|
|||
# See here for more informations
|
||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
||||
|
||||
# Move this file from check_process.default to check_process when you have filled it.
|
||||
|
||||
;; Test complet
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
|
@ -10,6 +5,7 @@
|
|||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
language=en
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
@ -35,10 +31,10 @@
|
|||
Level 8=0
|
||||
Level 9=0
|
||||
Level 10=0
|
||||
;;; Upgrade options
|
||||
; commit=01add99d3d903ca6d07f863045edf2ba46cf18d5
|
||||
name=Create check_process
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=Yes&
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=01add99d3d903ca6d07f863045edf2ba46cf18d5
|
||||
name=Create check_process
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=Yes&language=en&
|
||||
|
|
|
@ -4,11 +4,11 @@ location __PATH__/ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Example PHP configuration (remove if not used)
|
||||
index index.php;
|
||||
|
||||
# Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
|
||||
|
@ -19,13 +19,6 @@ location __PATH__/ {
|
|||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
|
||||
|
||||
# If you don't use a dedicated fpm config for your app,
|
||||
# use a general fpm pool.
|
||||
# This is to be used INSTEAD of line above
|
||||
# Don't forget to adjust scripts install/upgrade/remove/backup accordingly
|
||||
#
|
||||
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param HTTPS on if_not_empty;
|
||||
|
@ -33,11 +26,8 @@ location __PATH__/ {
|
|||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
# PHP configuration end
|
||||
|
||||
# Secure DokuWiki
|
||||
# Try this ?
|
||||
#location __PATH__/(data|conf|bin|inc)/ { {
|
||||
location ~ ^__PATH__/(data|conf|bin|inc)/ {
|
||||
deny all;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
"name": "Dokuwiki",
|
||||
"id": "dokuwiki",
|
||||
"packaging_format": 1,
|
||||
"requirements": {
|
||||
"yunohost": ">> 2.7.14"
|
||||
},
|
||||
"description": {
|
||||
"en": "DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database.",
|
||||
"fr": "DokuWiki est un wiki Open Source simple à utiliser et très polyvalent qui n'exige aucune base de données.",
|
||||
|
@ -12,8 +9,9 @@
|
|||
"es": "DokuWiki es un sistema de Wiki de uso sencillicimo y compatible con los estándares.",
|
||||
"it": "DokuWiki è un Wiki aderente agli standard, semplice da usare, finalizzato principalmente alla creazione di documentazione di qualsiasi tipo."
|
||||
},
|
||||
"version": "2018-04-22a~ynh1",
|
||||
"version": "2018-04-22a~ynh2",
|
||||
"url": "https://www.dokuwiki.org",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "Gofannon",
|
||||
"email": "gofannon@riseup.net"
|
||||
|
@ -21,16 +19,16 @@
|
|||
"previous_maintainers": [
|
||||
{
|
||||
"name": "opi",
|
||||
"email": "opi@zeropi.net",
|
||||
"url": ""
|
||||
}
|
||||
],
|
||||
"email": "opi@zeropi.net"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php5-fpm"
|
||||
],
|
||||
"license": "GPL-2.0-or-later",
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
|
@ -72,6 +70,7 @@
|
|||
},
|
||||
{
|
||||
"name": "language",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Choose the application language",
|
||||
"fr": "Choisissez la langue de l'application"
|
||||
|
|
|
@ -1,13 +1 @@
|
|||
#!/bin/bash
|
||||
|
||||
# ============= FUTURE YUNOHOST HELPER =============
|
||||
# Delete a file checksum from the app settings
|
||||
#
|
||||
# $app should be defined when calling this helper
|
||||
#
|
||||
# usage: ynh_remove_file_checksum file
|
||||
# | arg: file - The file for which the checksum will be deleted
|
||||
ynh_delete_file_checksum () {
|
||||
local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_'
|
||||
ynh_app_setting_delete $app $checksum_setting_name
|
||||
}
|
|
@ -45,7 +45,3 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
|
||||
ynh_backup "/etc/php5/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
|
||||
|
|
|
@ -69,8 +69,6 @@ then
|
|||
# Set global variables for nginx helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Store path_url setting
|
||||
ynh_app_setting_set $app path "$path_url"
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
@ -85,12 +83,6 @@ then
|
|||
ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
# ...
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -26,16 +26,6 @@ admin=$YNH_APP_ARG_ADMIN
|
|||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
|
||||
# This is a multi-instance app, meaning it can be installed several times independently
|
||||
# The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||
# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
||||
# The app instance name is available as $YNH_APP_INSTANCE_NAME
|
||||
# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
|
||||
# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
|
||||
# - ynhexample__{N} for the subsequent installations, with N=3,4, ...
|
||||
# The app instance name is probably what you are interested the most, since this is
|
||||
# guaranteed to be unique. This is a good unique identifier to define installation path,
|
||||
# db names, ...
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
|
@ -48,8 +38,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
|||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path $path_url)
|
||||
|
||||
# Check web path availability
|
||||
ynh_webpath_available $domain $path_url
|
||||
# Register (book) web path
|
||||
ynh_webpath_register $app $domain $path_url
|
||||
|
||||
|
@ -141,7 +129,6 @@ cp ../conf/acl.auth.php $final_path/conf
|
|||
# Other files will be read ony and owned by root.
|
||||
# See https://www.dokuwiki.org/install:permissions
|
||||
|
||||
|
||||
cp $final_path/conf/local.php.dist $final_path/conf/local.php.bak
|
||||
cp $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
|
||||
|
||||
|
@ -163,10 +150,7 @@ cp ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
|
|||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/conf/local.protected.php"
|
||||
### Files can be modified by user, no need to store checksum as they cannot be overwritten safely by package
|
||||
#ynh_store_file_checksum "$final_path/conf/local.php"
|
||||
#ynh_store_file_checksum "$final_path/conf/acl.auth.php"
|
||||
#=================================================
|
||||
### Files '$final_path/conf/local.php' and '$final_path/conf/acl.auth.php' can be modified by user, no need to store checksum as they cannot be overwritten safely by the upgrade script
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -180,19 +164,19 @@ ynh_store_file_checksum "$final_path/conf/local.protected.php"
|
|||
# Files owned by DokuWiki can just read
|
||||
chown -R root: $final_path
|
||||
|
||||
# DokuWiki needs to write inside these folders. Do "DokuWiki" owner
|
||||
chown $app:root $final_path/conf
|
||||
chown $app:root $final_path/inc
|
||||
# DokuWiki needs to write inside these folders. Make "DokuWiki" owner
|
||||
chown $app:root $final_path/{conf,inc}
|
||||
|
||||
# Do "DokuWiki" owner of configuration files that must be writable
|
||||
# Make "DokuWiki" owner of configuration files that must be writable
|
||||
chown $app:root $final_path/conf/{local.php,local.php.bak,users.auth.php,acl.auth.php,plugins.local.php,plugins.local.php.bak}
|
||||
|
||||
# Usefull for some plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
# See https://www.dokuwiki.org/devel:preload
|
||||
chown $app:root $final_path/inc/preload.php
|
||||
|
||||
# Grant read-only to all files as files copied above are owned by root by defaut and nginx cannot read them
|
||||
# There are only files in the folder and there are no sublevels. No need to use "find"
|
||||
chmod -R a+r $final_path/conf
|
||||
chmod -R a+r $final_path/inc
|
||||
chmod -R a+r $final_path/{conf,inc}
|
||||
|
||||
# Give write access to "data" and subfolders
|
||||
chown -R $app:root $final_path/data
|
||||
|
@ -215,14 +199,6 @@ find $final_path/lib -type d -print0 | xargs -0 chmod 0755
|
|||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
# Not needed as no skipped_uris have been added before.
|
||||
# Example : "ynh_app_setting_set $app skipped_uris ..."
|
||||
# See https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/37 for explanation
|
||||
#if [ $is_public -eq 0 ]
|
||||
#then # Remove the public access
|
||||
# ynh_app_setting_delete $app skipped_uris
|
||||
#fi
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
|
|
|
@ -20,8 +20,6 @@ final_path=$(ynh_app_setting_get $app final_path)
|
|||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -43,11 +41,6 @@ ynh_remove_nginx_config
|
|||
# Remove the dedicated php-fpm config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -63,51 +63,30 @@ ynh_system_user_create $app
|
|||
# Try to use "least privilege" to grant minimal access
|
||||
# For details, see https://www.dokuwiki.org/install:permissions
|
||||
|
||||
# Files owned by DokuWiki can just read
|
||||
chown -R root: $final_path
|
||||
# DokuWiki needs to write inside these folders. Make "DokuWiki" owner
|
||||
chown $app:root $final_path/{conf,inc}
|
||||
|
||||
# DokuWiki needs to write inside these folders. Do "DokuWiki" owner
|
||||
chown $app:root $final_path/conf
|
||||
chown $app:root $final_path/inc
|
||||
|
||||
# Do "DokuWiki" owner of configuration files that must be writable
|
||||
# Make "DokuWiki" owner of configuration files that must be writable
|
||||
chown $app:root $final_path/conf/{local.php,local.php.bak,users.auth.php,acl.auth.php,plugins.local.php,plugins.local.php.bak}
|
||||
# Useful for some plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
|
||||
# Usefull for some plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
# See https://www.dokuwiki.org/devel:preload
|
||||
chown $app:root $final_path/inc/preload.php
|
||||
# Grant read-only to all files as files copied above are owned by root by defaut and nginx cannot read them
|
||||
# There are only files in the folder and there are no sublevels. No need to use "find"
|
||||
chmod -R a+r $final_path/conf
|
||||
chmod -R a+r $final_path/inc
|
||||
|
||||
# Give write access to "data" and subfolders
|
||||
chown -R $app:root $final_path/data
|
||||
# Remove access to "other"
|
||||
chmod -R o-rwx $final_path/data
|
||||
|
||||
# Allow the web admin panel to run, aka "Extension Manager"
|
||||
chown -R $app:root $final_path/lib/plugins
|
||||
# Allow to install templates
|
||||
chown -R $app:root $final_path/lib/tpl
|
||||
|
||||
# Allow access to public assets like style sheets
|
||||
find $final_path/lib -type f -print0 | xargs -0 chmod 0644
|
||||
find $final_path/lib -type d -print0 | xargs -0 chmod 0755
|
||||
# Using "find" instead of "chmod -R 755" so files does not become executable too
|
||||
# chmod : -rwxr-xr-x 1 root root 241 May 3 08:36 index.html => BAD
|
||||
# find : -rw-r--r-- 1 1001 1002 241 May 3 08:36 index.html => GOOD
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -19,8 +19,6 @@ domain=$(ynh_app_setting_get $app domain)
|
|||
path_url=$(ynh_app_setting_get $app path)
|
||||
admin=$(ynh_app_setting_get $app admin)
|
||||
is_public=$(ynh_app_setting_get $app is_public)
|
||||
# Not needed during upgrade as user might have change it since installation from Dokuwiki admin panel
|
||||
#language=$(ynh_app_setting_get $app language)
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
|
||||
#=================================================
|
||||
|
@ -57,10 +55,10 @@ fi
|
|||
|
||||
|
||||
|
||||
# Yunohost specific configuration, if not exists
|
||||
# Yunohost specific configuration, if it isn't exist already
|
||||
|
||||
# Previously, these settings were store a unique "dokuwiki.php"
|
||||
# Now, they are split in multiples files to ease upgrading process (separate Yunohost config from user config)
|
||||
# Previously, these settings were store in an unique "dokuwiki.php"
|
||||
# Now, they are split in multiple files to ease upgrading process (separate Yunohost config from user config)
|
||||
|
||||
# Loading order of configuration files
|
||||
#
|
||||
|
@ -72,14 +70,10 @@ fi
|
|||
#
|
||||
# See https://www.dokuwiki.org/plugin:config#protecting_settings
|
||||
|
||||
|
||||
# Configuration dedicated to Yunohost (LDAP and admin mainly)
|
||||
# Create file if it does not exist
|
||||
if [ ! -f "$final_path/conf/local.protected.php" ]; then
|
||||
cp ../conf/local.protected.php $final_path/conf
|
||||
|
||||
# Set the default "admin"
|
||||
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "$final_path/conf/local.protected.php"
|
||||
touch $final_path/conf/local.protected.php
|
||||
fi
|
||||
|
||||
# Do not overwrite existing dokuwiki configuration as it could have user customization's and settings.
|
||||
|
@ -98,8 +92,6 @@ if [ ! -f "$final_path/conf/acl.auth.php" ]; then
|
|||
cp ../conf/acl.auth.php $final_path/conf
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# For securing DokuWiki installation, create default files that will be writable in the "conf" folder.
|
||||
# Other files will be read ony and owned by root.
|
||||
# See https://www.dokuwiki.org/install:permissions
|
||||
|
@ -225,8 +217,6 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# LDAP Configuration
|
||||
#=================================================
|
||||
|
@ -256,19 +246,19 @@ ynh_store_file_checksum "$final_path/conf/local.protected.php"
|
|||
# Files owned by DokuWiki can just read
|
||||
chown -R root: $final_path
|
||||
|
||||
# DokuWiki needs to write inside these folders. Do "DokuWiki" owner
|
||||
chown $app:root $final_path/conf
|
||||
chown $app:root $final_path/inc
|
||||
# DokuWiki needs to write inside these folders. Make "DokuWiki" owner
|
||||
chown $app:root $final_path/{conf,inc}
|
||||
|
||||
# Do "DokuWiki" owner of configuration files that must be writable
|
||||
# Make "DokuWiki" owner of configuration files that must be writable
|
||||
chown $app:root $final_path/conf/{local.php,local.php.bak,users.auth.php,acl.auth.php,plugins.local.php,plugins.local.php.bak}
|
||||
# Useful for some plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
|
||||
# Usefull for some plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
# See https://www.dokuwiki.org/devel:preload
|
||||
chown $app:root $final_path/inc/preload.php
|
||||
|
||||
# Grant read-only to all files as files copied above are owned by root by defaut and nginx cannot read them
|
||||
# There are only files in the folder and there is sublevels. No need to use "find"
|
||||
chmod -R a+r $final_path/conf
|
||||
chmod -R a+r $final_path/inc
|
||||
# There are only files in the folder and there are no sublevels. No need to use "find"
|
||||
chmod -R a+r $final_path/{conf,inc}
|
||||
|
||||
# Give write access to "data" and subfolders
|
||||
chown -R $app:root $final_path/data
|
||||
|
|
Loading…
Add table
Reference in a new issue