1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owncloud_ynh.git synced 2024-09-03 19:56:25 +02:00

Merge pull request #13 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-11-13 12:42:12 +01:00 committed by GitHub
commit 171910b43e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 74 additions and 46 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
ownCloud Infinite Scale (oCIS) is the new file sync & share platform that will be the foundation of your data management platform.
**Shipped version:** 4.0.1~ynh1
**Shipped version:** 5.0.0~ynh1
## Screenshots

View file

@ -19,7 +19,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
ownCloud Infinite Scale (oCIS) est la nouvelle plateforme de synchronisation et de partage de fichiers qui constituera la base de votre plateforme de gestion de données.
**Version incluse :** 4.0.1~ynh1
**Version incluse :** 5.0.0~ynh1
## Captures décran

View file

@ -1,15 +1,29 @@
OCIS_INSECURE=true
OCIS_URL=https://__DOMAIN__
PROXY_HTTP_ADDR=127.0.0.1:__PORT__
PROXY_TLS=true
OCIS_INSECURE=false
OCIS_BASE_DATA_PATH=__DATA_DIR__
FORCE_CONFIG_OVERWRITE=true
#OCIS_HTTP_TLS_CERTIFICATE="/etc/yunohost/certs/__DOMAIN__/crt.pem"
#OCIS_HTTP_TLS_KEY="/etc/yunohost/certs/__DOMAIN__/key.pem"
OCIS_LOG_LEVEL=warn
OCIS_CONFIG_DIR=__INSTALL_DIR__
OCIS_FORCE_CONFIG_OVERWRITE=true
ADMIN_PASSWORD=__PASSWORD__
OCIS_CONFIG_DIR=__INSTALL_DIR__
OCIS_BASE_DATA_PATH=__DATA_DIR__
IDM_ADMIN_PASSWORD=__PASSWORD__
OCIS_DEFAULT_LANGUAGE=__LANGUAGE__
#AUTH_BASIC_AUTH_MANAGER=ldap
#OCIS_LDAP_URI=ldap://localhost:9235
#OCIS_LDAP_USER_BASE_DN="ou=users,dc=yunohost,dc=org"
#OCIS_LDAP_GROUP_BASE_DN="ou=groups,dc=yunohost,dc=org"
#OCIS_LDAP_USER_FILTER=(&(|(objectclass=posixAccount))(uid=%uid)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))
#OCIS_LDAP_LOGIN_ATTRIBUTES="uid"
#OCIS_LDAP_USER_SCHEMA_MAIL="mail"
#OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME="cn"

View file

@ -5,9 +5,7 @@ Description=ownCloud Infinite Scale server
Type=simple
User=__APP__
Group=__APP__
Environment=OCIS_BASE_DATA_PATH=__DATA_DIR__
Environment=PROXY_HTTP_ADDR=127.0.0.1:__PORT__
Environment=OCIS_URL=https://__DOMAIN__
EnvironmentFile=__INSTALL_DIR__/ocis.env
ExecStart=__INSTALL_DIR__/ocis server
Restart=always

View file

@ -5,9 +5,9 @@ name = "ownCloud"
description.en = "Online storage, file sharing platform and various other applications"
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
version = "4.0.1~ynh1"
version = "5.0.0~ynh1"
maintainers = [""]
maintainers = ["eric_G"]
[upstream]
license = "Apache-2.0"
@ -20,8 +20,11 @@ cpe = "cpe:2.3:a:owncloud:owncloud"
yunohost = ">= 11.2"
architectures = ["amd64", "arm64", "armhf", "i386"]
multi_instance = false
ldap = false
sso = false
disk = "50M"
ram.build = "300M"
ram.runtime = "50M"
@ -34,20 +37,30 @@ ram.runtime = "50M"
type = "group"
default = "visitors"
[install.language]
ask.en = "Choose the application language"
ask.fr = "Choisissez la langue de l'application"
type = "select"
choices = ["de", "fr", "en"]
default = "fr"
[install.admin]
type = "user"
[install.password]
type = "password"
[resources]
[resources.sources.main]
amd64.url = "https://download.owncloud.com/ocis/ocis/stable/4.0.1/ocis-4.0.1-linux-amd64"
amd64.sha256 = "91f21d74099f5ae24ea4686913e8c916b20736c3f6dd64b5536957af5a5e31ae"
i386.url = "https://download.owncloud.com/ocis/ocis/stable/4.0.1/ocis-4.0.1-linux-386"
i386.sha256 = "68f876f2f094e1c2f0056a39910c0a94751b4138d211ffeae11b56e53ff37998"
arm64.url = "https://download.owncloud.com/ocis/ocis/stable/4.0.1/ocis-4.0.1-linux-arm64"
arm64.sha256 = "0003cb8d81c8468397229e917ffdd25476d1355eb1258b08e855473880398da9"
armhf.url = "https://download.owncloud.com/ocis/ocis/stable/4.0.1/ocis-4.0.1-linux-arm"
armhf.sha256 = "d6cd4c21356f0ebaaa8bfda0e2b3bd481402248af4647c901141f85febc16106"
amd64.url = "https://download.owncloud.com/ocis/ocis/testing/5.0.0-alpha.2/ocis-5.0.0-alpha.2-linux-amd64"
amd64.sha256 = "704a1c210ad98ddc8131b54f5e7cf9ee21917e82f2fa0828a096825023002965"
arm64.url = "https://download.owncloud.com/ocis/ocis/testing/5.0.0-alpha.2/ocis-5.0.0-alpha.2-linux-arm64"
arm64.sha256 = "0d32c5fd7e3e7c15c248690e9da9f606b64a9ccb446dd92d84f6b821b2c1f579"
armhf.url = "https://download.owncloud.com/ocis/ocis/testing/5.0.0-alpha.2/ocis-5.0.0-alpha.2-linux-arm"
armhf.sha256 = "45270ba7c2325032aacd99a91c7df23a9ffb3cb30ddc9ca56798d24ea95427c4"
i386.url = "https://download.owncloud.com/ocis/ocis/testing/5.0.0-alpha.2/ocis-5.0.0-alpha.2-linux-386"
i386.sha256 = "6d997bdef3c9f38cd7dd55025d8436df641db3e19316db66d514af52ce0effe9"
in_subdir = false
rename = "ocis"
@ -62,3 +75,10 @@ ram.runtime = "50M"
[resources.permissions]
main.url = "/"
main.auth_header = false
api.url = "/api"
api.auth_header = false
api.show_tile = false
api.protected= true
api.allowed = ["visitors"]

View file

@ -17,15 +17,14 @@ ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chmod +x $install_dir/ocis
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -38,19 +37,21 @@ yunohost service add $app --description="File sharing platform" --log="/var/log/
#=================================================
# ADD A CONFIGURATION
#=================================================
#ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_script_progression --message="Adding a configuration file..." --weight=1
#ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
ynh_add_config --template=".env" --destination="$install_dir/ocis.env"
#chmod 600 "$install_dir/.env"
#chown $app:$app "$install_dir/.env"
chmod 400 "$install_dir/ocis.env"
chown $app:$app "$install_dir/ocis.env"
#=================================================
# INSTALL OWNCLOUD
#=================================================
ynh_script_progression --message="Installing $app..." --weight=3
(cd "$install_dir" && ./ocis init --insecure=true --force-overwrite=true --admin-password=$password --config-path=$install_dir/.ocis/config)
pushd "$install_dir"
./ocis init --insecure=true --force-overwrite=true --admin-password=$password --config-path=$install_dir
popd
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"

View file

@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
# REMOVE SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null

View file

@ -32,9 +32,11 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R $app:www-data "$data_dir"
#=================================================
# RESTORE THE NGINX CONFIGURATION
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -50,13 +52,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -33,18 +33,17 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".ocis"
ynh_setup_source --dest_dir="$install_dir" --keep=".ocis ocis.env"
fi
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chmod +x $install_dir/ocis
#=================================================
# PHP-FPM CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config