diff --git a/README.md b/README.md index b152edc..c2d6c1f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Cockpit is an interactive server admin interface. It is easy to use and very lightweight. Cockpit interacts directly with the operating system from a real Linux session in a browser. -**Shipped version:** 239~ynh1 +**Shipped version:** 239~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f446db9..b91e697 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Cockpit est une interface d'administration de serveur interactive. Il est facile à utiliser et très léger. Cockpit interagit directement avec le système d'exploitation à partir d'une vraie session Linux dans un navigateur. -**Version incluse :** 239~ynh1 +**Version incluse :** 239~ynh2 ## Captures d’écran diff --git a/manifest.toml b/manifest.toml index 4c38cee..1799633 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Cockpit" description.en = "Sysadmin login session in a web browser" description.fr = "Session de connexion sysadmin dans un navigateur Web" -version = "239~ynh1" +version = "239~ynh2" maintainers = [] @@ -35,6 +35,10 @@ ram.runtime = "50M" type = "path" default = "/monitor" + [install.init_main_permission] + type = "group" + default = "visitors" + [resources] [resources.system_user] diff --git a/scripts/change_url b/scripts/change_url index 27f477b..6320d98 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,12 +30,17 @@ ynh_change_url_nginx_config #================================================= # UPDATE A CONFIG FILE #================================================= +ynh_script_progression --message="Fixing up permissions..." --weight=1 + +usermod -a -G cockpit cockpit-ws +usermod -a -G cockpit cockpit-wsinstance + ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="../conf/cockpit.conf" --destination="/etc/cockpit/cockpit.conf" chmod 650 "/etc/cockpit/cockpit.conf" -chown root:$app-ws "/etc/cockpit/cockpit.conf" +chown root:$app "/etc/cockpit/cockpit.conf" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 23e7e82..a84aa68 100644 --- a/scripts/install +++ b/scripts/install @@ -22,6 +22,11 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= +ynh_script_progression --message="Fixing up permissions..." --weight=1 + +usermod -a -G cockpit cockpit-ws +usermod -a -G cockpit cockpit-wsinstance + ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_replace_string --match_string="ListenStream=.*" --replace_string="ListenStream=$port" --target_file="/lib/systemd/system/cockpit.socket" @@ -31,7 +36,7 @@ systemctl restart $app.socket ynh_add_config --template="../conf/cockpit.conf" --destination="/etc/cockpit/cockpit.conf" chmod 650 "/etc/cockpit/cockpit.conf" -chown root:$app-ws "/etc/cockpit/cockpit.conf" +chown root:$app "/etc/cockpit/cockpit.conf" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 92551e1..65ebc3a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -13,6 +13,11 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE VARIOUS FILES #================================================= +ynh_script_progression --message="Fixing up permissions..." --weight=1 + +usermod -a -G cockpit cockpit-ws +usermod -a -G cockpit cockpit-wsinstance + ynh_script_progression --message="Restoring various files..." --weight=1 ynh_replace_string --match_string="ListenStream=.*" --replace_string="ListenStream=$port" --target_file="/lib/systemd/system/cockpit.socket" diff --git a/scripts/upgrade b/scripts/upgrade index a4b40fa..4049d4f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,6 +37,11 @@ yunohost service add $app --description="Sysadmin login session in a web browser #================================================= # UPDATE A CONFIG FILE #================================================= +ynh_script_progression --message="Fixing up permissions..." --weight=1 + +usermod -a -G cockpit cockpit-ws +usermod -a -G cockpit cockpit-wsinstance + ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_replace_string --match_string="ListenStream=.*" --replace_string="ListenStream=$port" --target_file="/lib/systemd/system/cockpit.socket" @@ -46,7 +51,7 @@ systemctl restart $app.socket ynh_add_config --template="../conf/cockpit.conf" --destination="/etc/cockpit/cockpit.conf" chmod 650 "/etc/cockpit/cockpit.conf" -chown root:$app-ws "/etc/cockpit/cockpit.conf" +chown root:$app "/etc/cockpit/cockpit.conf" #================================================= # START SYSTEMD SERVICE