diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 0685205..d3412c3 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,4 +1,4 @@ -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Package to create a Time Machine Backup Source ### Features diff --git a/manifest.json b/manifest.json index 9e42d40..e4d7133 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "App to setup the server as a Time Machine backup target", "fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)" }, - "version": "1.0~ynh1", + "version": "1.0~ynh2", "url": "https://example.com", "upstream": { "license": "free", @@ -33,7 +33,7 @@ "name": "admin", "type": "string", "help": { - "en": "User to whom the details will be sent", + "en": "User to whom the usage details will be sent", "fr": "" } }, diff --git a/scripts/_common.sh b/scripts/_common.sh index 505506a..018383e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,6 +25,15 @@ samba_sysadmin_update () { ls /etc/smb/smb.d/* | sed -e 's/^/include = /' > /etc/smb/includes.conf } +samba_sysadmin_add () { + if grep -R "include = /etc/sdmb/includes.conf" /etc/samba/smb.conf + then + echo "The includes.conf file is already present in your smb.conf file." + else + echo "include = /etc/smb/includes.conf" >> /etc/samba/smb.conf + fi +} + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 1f1e786..67e6792 100755 --- a/scripts/install +++ b/scripts/install @@ -112,6 +112,9 @@ ynh_add_config --template="../conf/avahi-samba.service" --destination="/etc/avah # Update samba configuration samba_sysadmin_update +# Check and Add +samba_sysadmin_add + #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/remove b/scripts/remove index 0ba46b1..0d864ab 100755 --- a/scripts/remove +++ b/scripts/remove @@ -61,6 +61,8 @@ ynh_script_progression --message="Removing various files..." --time --weight=1 ynh_secure_remove --file="/etc/smb/smb.d/$app.conf" ynh_secure_remove --file="/etc/avahi/services/$app.service" +samba_sysadmin_update + #================================================= # GENERIC FINALIZATION #================================================= @@ -71,6 +73,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --time # Delete a system user ynh_system_user_delete --username=$app + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 26f3c1e..9223574 100755 --- a/scripts/restore +++ b/scripts/restore @@ -111,6 +111,7 @@ ynh_restore_file --origin_path="/etc/smb/smb.d/$app.conf" ynh_restore_file --origin_path="/etc/avahi/services/$app.service" samba_sysadmin_update +samba_sysadmin_add #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index f0edf1c..7ffea6a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,6 +139,9 @@ ynh_script_progression --message="Updating a configuration file..." --time --wei ynh_add_config --template="../conf/smb.conf" --destination="/etc/smb/smb.d/$app.conf" ynh_add_config --template="../conf/avahi-samba.service" --destination="/etc/avahi/services/$app.service" +samba_sysadmin_update +samba_sysadmin_add + # FIXME: this should be handled by the core in the future # You may need to use chmod 600 instead of 400, # for example if the app is expected to be able to modify its own config