From 9ff5b4883e22036cf0337fd8857e62d98ecbf3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:28:27 +0200 Subject: [PATCH] fix --- conf/.env | 2 +- conf/systemd.service | 2 +- manifest.toml | 1 + scripts/install | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/.env b/conf/.env index 04dbc44..64c9bec 100644 --- a/conf/.env +++ b/conf/.env @@ -5,7 +5,7 @@ PROXY_TLS=true OCIS_INSECURE=true OCIS_LOG_LEVEL=warn OCIS_FORCE_CONFIG_OVERWRITE=true -OCIS_CONFIG_DIR=__INSTALL_DIR__ +OCIS_CONFIG_DIR=__DATA_DIR__/config/ OCIS_BASE_DATA_PATH=__DATA_DIR__ OCIS_DEFAULT_LANGUAGE=__LANGUAGE__ #OCIS_EXCLUDE_RUN_SERVICES=thumbnails diff --git a/conf/systemd.service b/conf/systemd.service index c7cf706..9130d78 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -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 diff --git a/manifest.toml b/manifest.toml index 1bc8395..2f5e09c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -71,6 +71,7 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] + subdirs = ["config"] [resources.ports] diff --git a/scripts/install b/scripts/install index bd6a66c..cc91e15 100755 --- a/scripts/install +++ b/scripts/install @@ -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/ocis.env" +chown $app:$app "$data_dir/ocis.env" #================================================= # INSTALL OWNCLOUD @@ -52,7 +52,7 @@ 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"