mirror of
https://github.com/YunoHost-Apps/samba_ynh.git
synced 2024-09-03 20:16:27 +02:00
commit
41a629886d
17 changed files with 157 additions and 130 deletions
|
@ -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)
|
||||
|
|
|
@ -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: <https://www.samba.org/>
|
||||
|
|
|
@ -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: <https://www.samba.org/>
|
||||
|
|
|
@ -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: <https://www.samba.org/>
|
||||
|
|
|
@ -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 : <https://www.samba.org/>
|
||||
|
|
|
@ -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: <https://www.samba.org/>
|
||||
|
|
49
README_id.md
Normal file
49
README_id.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Ini TIDAK boleh diedit dengan tangan.
|
||||
-->
|
||||
|
||||
# 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: <https://www.samba.org/>
|
||||
- Dokumentasi admin resmi: <https://www.samba.org/samba/docs/>
|
||||
- Depot kode aplikasi hulu: <https://git.samba.org/?p=samba.git;a=summary>
|
||||
- Gudang YunoHost: <https://apps.yunohost.org/app/samba>
|
||||
- Laporkan bug: <https://github.com/YunoHost-Apps/samba_ynh/issues>
|
||||
|
||||
## 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:** <https://yunohost.org/packaging_apps>
|
49
README_ru.md
Normal file
49
README_ru.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Он НЕ ДОЛЖЕН редактироваться вручную.
|
||||
-->
|
||||
|
||||
# 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
|
||||
## Документация и ресурсы
|
||||
|
||||
- Официальный веб-сайт приложения: <https://www.samba.org/>
|
||||
- Официальная документация администратора: <https://www.samba.org/samba/docs/>
|
||||
- Репозиторий кода главной ветки приложения: <https://git.samba.org/?p=samba.git;a=summary>
|
||||
- Магазин YunoHost: <https://apps.yunohost.org/app/samba>
|
||||
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/samba_ynh/issues>
|
||||
|
||||
## Информация для разработчиков
|
||||
|
||||
Пришлите Ваш запрос на слияние в [ветку `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
|
||||
```
|
||||
|
||||
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>
|
|
@ -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
|
||||
## 文档与资源
|
||||
|
||||
- 官方应用网站: <https://www.samba.org/>
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# FUTURE OFFICIAL HELPERS
|
||||
# COMMON VARIABLES AND CUSTOM HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -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)."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <<EOF
|
||||
# =================================================
|
||||
|
||||
# DO NOT EDIT THIS FILE
|
||||
# EDIT SUBPARTS IN /etc/samba/smb.conf.d
|
||||
# =================================================
|
||||
|
@ -47,25 +41,22 @@ ynh_add_config --template="share-smb.conf" --destination="$install_dir/smb.conf.
|
|||
EOF
|
||||
cat $install_dir/smb.conf.d/*.conf >> $install_dir/smb.conf
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
ynh_script_progression "Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add smbd --description="Samba service" --log="/var/log/smbd/smbd.log" --needs_exposed_ports $port
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=10
|
||||
ynh_script_progression "Starting $app's systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=smbd --action="start"
|
||||
ynh_systemctl --service=smbd --action="start"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
ynh_script_progression "Installation of $app completed"
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -15,10 +9,9 @@ source /usr/share/yunohost/helpers
|
|||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue