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 #32 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-06-20 11:56:50 +02:00 committed by GitHub
commit 0db4b8772f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 18 deletions

View file

@ -1,17 +1,17 @@
TZ=__TIMEZONE__
OCIS_URL=https://__DOMAIN__
#OCIS_PUBLIC_URL=https://__DOMAIN__
PROXY_HTTP_ADDR=127.0.0.1:__PORT__
PROXY_TLS=true
OCIS_INSECURE=true
OCIS_INSECURE=false
OCIS_LOG_LEVEL=warn
OCIS_FORCE_CONFIG_OVERWRITE=true
OCIS_CONFIG_DIR=__INSTALL_DIR__
OCIS_CONFIG_DIR=__DATA_DIR__/config/
#OCIS_FORCE_CONFIG_OVERWRITE=true
OCIS_BASE_DATA_PATH=__DATA_DIR__
OCIS_DEFAULT_LANGUAGE=__LANGUAGE__
#OCIS_EXCLUDE_RUN_SERVICES=thumbnails
# Set this to true if you want to enforce passwords on all public shares.
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=false

View file

@ -5,7 +5,7 @@ Description=ownCloud: Infinite Scale server
Type=simple
User=__APP__
Group=__APP__
EnvironmentFile=__INSTALL_DIR__/ocis.env
EnvironmentFile=__DATA_DIR__/config/ocis.env
ExecStart=__INSTALL_DIR__/ocis server
Restart=always

View file

@ -71,13 +71,13 @@ ram.runtime = "50M"
[resources.install_dir]
[resources.data_dir]
subdirs = ["config"]
[resources.ports]
[resources.permissions]
main.url = "/"
main.auth_header = false
api.url = "/api"
api.auth_header = false
api.show_tile = false

View file

@ -41,10 +41,10 @@ yunohost service add $app --description="File sharing platform" --log="/var/log/
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template=".env" --destination="$install_dir/ocis.env"
ynh_add_config --template=".env" --destination="$data_dir/config/ocis.env"
chmod 400 "$install_dir/ocis.env"
chown $app:$app "$install_dir/ocis.env"
chmod 400 "$data_dir/config/ocis.env"
chown $app:$app "$data_dir/config/ocis.env"
#=================================================
# INSTALL OWNCLOUD
@ -52,12 +52,13 @@ chown $app:$app "$install_dir/ocis.env"
ynh_script_progression --message="Installing $app..." --weight=3
pushd "$install_dir"
./ocis init --insecure=true --force-overwrite=true --admin-password=$password --config-path=$install_dir
./ocis init --insecure=true --force-overwrite=true --admin-password=$password --config-path=$data_dir/config/
popd
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chown $app:$app "$data_dir/config/ocis.yaml"
#=================================================
# START SYSTEMD SERVICE

View file

@ -20,13 +20,22 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [[ -f "$install_dir/ocis.yaml" ]]; then
mv "$install_dir/ocis.yaml" "$data_dir/config/ocis.yaml"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
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" --full_replace=1 --keep="ocis.env ocis.yaml"
ynh_setup_source --dest_dir="$install_dir" --full_replace=1
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -48,12 +57,12 @@ 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=".env" --destination="$install_dir/ocis.env"
ynh_add_config --template=".env" --destination="$install_dir/ocis.env"
#chmod 400 "$install_dir/ocis.env"
#chown $app:$app "$install_dir/ocis.env"
chmod 400 "$install_dir/ocis.env"
chown $app:$app "$install_dir/ocis.env"
#=================================================
# START SYSTEMD SERVICE