From 1edd5bbe593f60e08ea263ab73dda06f6eef6807 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 6 Dec 2021 22:54:30 +0100 Subject: [PATCH] Fix --- conf/cockpit.conf | 8 ++++++++ manifest.json | 12 +++++++----- scripts/install | 10 ++++++++-- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 conf/cockpit.conf diff --git a/conf/cockpit.conf b/conf/cockpit.conf new file mode 100644 index 0000000..4adb59a --- /dev/null +++ b/conf/cockpit.conf @@ -0,0 +1,8 @@ +[WebService] +Origins = https://__DOMAIN__ +https://127.0.0.1:9090 + +[WebService] +ProtocolHeader = X-Forwarded-Proto + +UrlRoot = __PATH__/ \ No newline at end of file diff --git a/manifest.json b/manifest.json index e9dbce2..ab8b47e 100644 --- a/manifest.json +++ b/manifest.json @@ -11,9 +11,7 @@ "upstream": { "license": "LGPL-2.1-only", "website": "https://cockpit-project.org/", - "demo": "https://demo.example.com", - "admindoc": "https://cockpit-project.org/documentation.html", - "code": "https://some.forge.com/example/example" + "admindoc": "https://cockpit-project.org/documentation.html" }, "license": "LGPL-2.1-only", "maintainer": { @@ -35,8 +33,12 @@ { "name": "path", "type": "path", - "example": "/cockpit", - "default": "/cockpit" + "help": { + "en": "/cockpit/ and /cockpit+ are reserved and should not be used.", + "fr": "/cockpit/ et /cockpit+ sont réservés et ne doivent pas être utilisés." + }, + "example": "/monitor", + "default": "/monitor" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 38a1043..9e75e99 100644 --- a/scripts/install +++ b/scripts/install @@ -68,6 +68,13 @@ ynh_script_progression --message="Installing dependencies..." --weight=20 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/cockpite.conf" --destination="/etc/cockpit/cockpit.conf" + #================================================= # NGINX CONFIGURATION #================================================= @@ -82,8 +89,7 @@ ynh_add_nginx_config ynh_script_progression --message="Starting a systemd service..." --weight=2 # Reload services -systemctl start $app -systemctl enable $app --quiet +systemctl enable cockpit.socket --quiet #================================================= # SETUP SSOWAT