diff --git a/ALL_README.md b/ALL_README.md index 152f2e7..e3c80d2 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -5,4 +5,6 @@ - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [Baca README dalam bahasa bahasa Indonesia](README_id.md) +- [Прочитать README на русский](README_ru.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 2c7f017..85fdde9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Samba for YunoHost -[![Integration level](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![Working status](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Working status](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![Install Samba with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**Shipped version:** 4.13.13~ynh2 +**Shipped version:** 4.13.13~yn3 ## Documentation and resources - Official app website: diff --git a/README_es.md b/README_es.md index 9772bee..232dc22 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # Samba para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![Instalar Samba con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**Versión actual:** 4.13.13~ynh2 +**Versión actual:** 4.13.13~yn3 ## Documentaciones y recursos - Sitio web oficial: diff --git a/README_eu.md b/README_eu.md index e729211..b4f3100 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # Samba YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![Instalatu Samba YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**Paketatutako bertsioa:** 4.13.13~ynh2 +**Paketatutako bertsioa:** 4.13.13~yn3 ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index 087f8ef..76d757e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # Samba pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![Installer Samba avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**Version incluse :** 4.13.13~ynh2 +**Version incluse :** 4.13.13~yn3 ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index 8666a5c..0a3f6f9 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # Samba para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![Instalar Samba con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**Versión proporcionada:** 4.13.13~ynh2 +**Versión proporcionada:** 4.13.13~yn3 ## Documentación e recursos - Web oficial da app: diff --git a/README_id.md b/README_id.md new file mode 100644 index 0000000..6cd04a4 --- /dev/null +++ b/README_id.md @@ -0,0 +1,49 @@ + + +# Samba untuk YunoHost + +[![Tingkat integrasi](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) + +[![Pasang Samba dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) + +*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)* + +> *Paket ini memperbolehkan Anda untuk memasang Samba secara cepat dan mudah pada server YunoHost.* +> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.* + +## Ringkasan + +This package allows you to create directories reachable on a private network. + +### Features + +- Create and name your directories; +- Configure permissions for your directories thanks to the yunohost permission view; +- Define readonly directories + + +**Versi terkirim:** 4.13.13~yn3 +## Dokumentasi dan sumber daya + +- Website aplikasi resmi: +- Dokumentasi admin resmi: +- Depot kode aplikasi hulu: +- Gudang YunoHost: +- Laporkan bug: + +## Info developer + +Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/samba_ynh/tree/testing). + +Untuk mencoba branch `testing`, silakan dilanjutkan seperti: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/samba_ynh/tree/testing --debug +atau +sudo yunohost app upgrade samba -u https://github.com/YunoHost-Apps/samba_ynh/tree/testing --debug +``` + +**Info lebih lanjut mengenai pemaketan aplikasi:** diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..7dfd2b4 --- /dev/null +++ b/README_ru.md @@ -0,0 +1,49 @@ + + +# Samba для YunoHost + +[![Уровень интеграции](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) + +[![Установите Samba с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) + +*[Прочтите этот README на других языках.](./ALL_README.md)* + +> *Этот пакет позволяет Вам установить Samba быстро и просто на YunoHost-сервер.* +> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* + +## Обзор + +This package allows you to create directories reachable on a private network. + +### Features + +- Create and name your directories; +- Configure permissions for your directories thanks to the yunohost permission view; +- Define readonly directories + + +**Поставляемая версия:** 4.13.13~yn3 +## Документация и ресурсы + +- Официальный веб-сайт приложения: +- Официальная документация администратора: +- Репозиторий кода главной ветки приложения: +- Магазин YunoHost: +- Сообщите об ошибке: + +## Информация для разработчиков + +Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/samba_ynh/tree/testing). + +Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/samba_ynh/tree/testing --debug +или +sudo yunohost app upgrade samba -u https://github.com/YunoHost-Apps/samba_ynh/tree/testing --debug +``` + +**Больше информации о пакетировании приложений:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index b047e55..3a33d55 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 Samba -[![集成程度](https://dash.yunohost.org/integration/samba.svg)](https://dash.yunohost.org/appci/app/samba) ![工作状态](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/samba.svg)](https://ci-apps.yunohost.org/ci/apps/samba/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/samba.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/samba.maintain.svg) [![使用 YunoHost 安装 Samba](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=samba) @@ -25,7 +25,7 @@ This package allows you to create directories reachable on a private network. - Define readonly directories -**分发版本:** 4.13.13~ynh2 +**分发版本:** 4.13.13~yn3 ## 文档与资源 - 官方应用网站: diff --git a/manifest.toml b/manifest.toml index 9ec9dd4..c88d789 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Samba" description.en = "Share directories on your private network thanks to SMB protocol" description.fr = "Partager des dossiers sur un réseau privé via le protocole SMB" -version = "4.13.13~ynh2" +version = "4.13.13~yn3" maintainers = ["Galette"] @@ -16,7 +16,8 @@ admindoc = "https://www.samba.org/samba/docs/" code = "https://git.samba.org/?p=samba.git;a=summary" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.29" +helpers_version = "2.1" architectures = "all" multi_instance = false diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index d2db266..0570e1d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,34 +1,24 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$data_dir" --is_big +ynh_backup "$data_dir" #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/config b/scripts/config index 55f35ed..e7ce35a 100644 --- a/scripts/config +++ b/scripts/config @@ -8,18 +8,12 @@ # (validation of several interdependent fields, specific getter/setter for a value, # display dynamic informations or choices, pre-loading of config type .cube... ). -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source /usr/share/yunohost/helpers -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors -data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) -install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +data_dir=$(ynh_app_setting_get --key=data_dir) +install_dir=$(ynh_app_setting_get --key=install_dir) #================================================= # recreate the smb.conf from smb.conf.d @@ -35,7 +29,6 @@ EOF cat $install_dir/smb.conf.d/*.conf >> $install_dir/smb.conf } - #================================================= # SPECIFIC SETTERS FOR TOML SHORT KEYS #================================================= @@ -56,7 +49,7 @@ set__directories() { # Create the directory mkdir -p $data_dir/$directory - chmod 750 "$data_dir/$directory" + #REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$data_dir/$directory" chmod -R o-rwx "$data_dir/$directory" chown -R root:root "$data_dir/$directory" setfacl -R -m g:samba.$directory:rwx,d:g:samba.$directory:rwx $data_dir/$directory @@ -85,7 +78,7 @@ END # Remove configuration for unlisted directories for directory in $(find $install_dir/smb.conf.d/ -maxdepth 1 -type f -not -name '0-global.conf' -exec basename {} \;); do if ! [[ "${directory%.conf}" =~ $(echo "^($(echo $directories | sed 's/,\| /|/g'))$") ]]; then - ynh_secure_remove "$install_dir/smb.conf.d/$directory" + ynh_safe_rm "$install_dir/smb.conf.d/$directory" fi done @@ -123,7 +116,5 @@ set__unbrowseable() { write_smb_conf } -#================================================= -# GENERIC FINALIZATION #================================================= ynh_app_config_run $1 diff --git a/scripts/install b/scripts/install index 4edf583..fcd3d9f 100755 --- a/scripts/install +++ b/scripts/install @@ -1,30 +1,23 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 +ynh_script_progression "Storing installation settings..." -ynh_app_setting_set --app=$app --key=directories --value=share -ynh_app_setting_set --app=$app --key=advanced --value=0 -ynh_app_setting_set --app=$app --key=readonly_dir --value='' -ynh_app_setting_set --app=$app --key=unbrowseable --value='' +ynh_app_setting_set --key=directories --value=share +ynh_app_setting_set --key=advanced --value=0 +ynh_app_setting_set --key=readonly_dir --value='' +ynh_app_setting_set --key=unbrowseable --value='' #================================================= # CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 +ynh_script_progression "Creating a data directory..." -chmod 750 "$data_dir/share" chmod -R o-rwx "$data_dir/share" chown -R root:root "$data_dir/share" setfacl -R -m g:samba.share:rwx,d:g:samba.share:rwx $data_dir/share @@ -32,14 +25,15 @@ setfacl -R -m g:samba.share:rwx,d:g:samba.share:rwx $data_dir/share #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression "Adding $app's configuration..." mkdir -p $install_dir/smb.conf.d -ynh_add_config --template="global-smb.conf" --destination="$install_dir/smb.conf.d/0-global.conf" -ynh_add_config --template="share-smb.conf" --destination="$install_dir/smb.conf.d/share.conf" +ynh_config_add --template="global-smb.conf" --destination="$install_dir/smb.conf.d/0-global.conf" +ynh_config_add --template="share-smb.conf" --destination="$install_dir/smb.conf.d/share.conf" cat > $install_dir/smb.conf </dev/null +if ynh_hide_warnings yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service integration..." --weight=1 + ynh_script_progression "Removing $app service integration..." yunohost service remove smbd fi @@ -26,4 +19,4 @@ fi # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index ba15529..ca819c0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,12 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -15,25 +8,23 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chown -R root:root "$install_dir" +ynh_restore "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=1 +ynh_script_progression "Restoring the data directory..." -ynh_restore_file --origin_path="$data_dir" --not_mandatory +ynh_restore "$data_dir" chown -R root:root "$data_dir" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +ynh_script_progression "Integrating service in YunoHost..." # Don't add --needs_exposed_ports 445 , we don't want a remote diagnosis here yunohost service add smbd --description="Samba service" --log="/var/log/smbd/smbd.log" --needs_exposed_ports $port @@ -41,14 +32,12 @@ yunohost service add smbd --description="Samba service" --log="/var/log/smbd/smb #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=10 +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name=smbd --action="start" +ynh_systemctl --service=smbd --action="start" -#================================================= -# GENERIC FINALIZATION #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 31da8bf..3dffc33 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,35 +1,19 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=4 +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name=smbd --action="stop" +ynh_systemctl --service=smbd --action="stop" -#================================================= -# GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +ynh_script_progression "Integrating service in YunoHost..." # Don't add --needs_exposed_ports 445 , we don't want a remote diagnosis here yunohost service add smbd --description="Samba service" --log="/var/log/smbd/smbd.log" --needs_exposed_ports $port @@ -37,12 +21,12 @@ yunohost service add smbd --description="Samba service" --log="/var/log/smbd/smb #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name=smbd --action="start" +ynh_systemctl --service=smbd --action="start" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed"