From 2644bb47284934489812e2b200d47e910a508fc2 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 08:59:43 +0200 Subject: [PATCH] fix --- conf/.env | 6 +++++- conf/proxy.yaml | 2 ++ conf/systemd.service | 2 +- manifest.toml | 1 + scripts/install | 8 +++++--- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 conf/proxy.yaml diff --git a/conf/.env b/conf/.env index da1aee0..8124590 100644 --- a/conf/.env +++ b/conf/.env @@ -1,15 +1,19 @@ TZ=__TIMEZONE__ OCIS_URL=https://__DOMAIN__ + PROXY_HTTP_ADDR=127.0.0.1:__PORT__ + 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__ diff --git a/conf/proxy.yaml b/conf/proxy.yaml new file mode 100644 index 0000000..7eea935 --- /dev/null +++ b/conf/proxy.yaml @@ -0,0 +1,2 @@ +http: + addr: 127.0.0.1:__PORT__ 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 f0a37d2..d118a44 100755 --- a/scripts/install +++ b/scripts/install @@ -41,10 +41,12 @@ 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="proxy.yaml" --destination="$data_dir/config/proxy.yaml" -chmod 400 "$install_dir/ocis.env" -chown $app:$app "$install_dir/ocis.env" +ynh_add_config --template=".env" --destination="$data_dir/config/ocis.env" + +chmod 400 "$data_dir/config/ocis.env" +chown $app:$app "$data_dir/config/ocis.env" #================================================= # INSTALL OWNCLOUD