From 208984c1c350e689791ce17383cf64d342a332dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Dec 2023 18:13:51 +0100 Subject: [PATCH] cleaning --- conf/msg_install | 4 ---- doc/ADMIN.md | 1 - doc/POST_INSTALL.md | 3 +-- manifest.toml | 4 ++-- scripts/install | 13 +++---------- scripts/remove | 12 ------------ scripts/upgrade | 4 ++-- 7 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 conf/msg_install diff --git a/conf/msg_install b/conf/msg_install deleted file mode 100644 index 371648b..0000000 --- a/conf/msg_install +++ /dev/null @@ -1,4 +0,0 @@ -Time Machine was successfully installed :) -Your connection string is: -smb://__APP__:__PASSWORD__@YOUR_IP/__APP__ -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/timemachine_ynh diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 9866c6a..a780d9a 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,7 +1,6 @@ * Any known limitations, constrains or stuff not working, such as (but not limited to): * Only the *.local location is detected automatically. To use the domain, you need to first manually connect to the server using the command `open THE_CONNECTION_STRING` on your Mac * There is currently no granular control for disallowing connections from hosts (i.e anyone with the username, password and domain can connect to the Time Machine Volume) - * Connecting manually: * The connection string format is also sent via e-mail `smb://timemachine:password@IP_OR_DOMAIN/timemachine` * In Finder, use `Command+K` and enter the connection string. If `timemachine` is greyed out, you might need to unmount the volume using the command `sudo umount /Volumes/timemachine` first diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 6017bbe..4c0e98a 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,4 +1,3 @@ -Time Machine was successfully installed :) Your connection string is: + smb://__APP__:__PASSWORD__@YOUR_IP/__APP__ -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/timemachine_ynh \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 3e7b5ff..70a98e6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,8 +2,8 @@ packaging_format = 2 id = "timemachine" name = "Time Machine" -description.en = "Application to configure the server as a Time Machine backup target" -description.fr = "Application pour configurer le serveur comme cible de sauvegarde Time Machine" +description.en = "Configure the server as a Time Machine backup target" +description.fr = "Configurer le serveur comme cible de sauvegarde Time Machine" version = "1.0~ynh5" diff --git a/scripts/install b/scripts/install index 08d17af..3d9b95f 100755 --- a/scripts/install +++ b/scripts/install @@ -31,8 +31,8 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp TCP 445 # Allow SMB access ynh_script_progression --message="Adding a configuration file..." --weight=1 samba_sysadmin_setup -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" +ynh_add_config --template="smb.conf" --destination="/etc/smb/smb.d/$app.conf" +ynh_add_config --template="avahi-samba.service" --destination="/etc/avahi/services/$app.service" # Create a samba user (echo "$password"; echo "$password") | ynh_exec_warn_less smbpasswd -s -a "$app" @@ -46,7 +46,7 @@ samba_sysadmin_add #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add smbd --needs_exposed_ports 445 @@ -60,13 +60,6 @@ ynh_exec_warn_less testparm -s ynh_systemd_action --service_name=smbd --action="reload" ynh_systemd_action --service_name=avahi-daemon --action="restart" -#================================================= -# SEND A README FOR THE ADMIN -#================================================= -ynh_script_progression --message="Sending a readme for the admin..." - -ynh_send_readme_to_admin --app_message="../conf/msg_install" --recipients="$admin_mail" --type='install' - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index d832e07..19490c0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,21 +29,9 @@ then yunohost service remove avahi-daemon fi -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - # Delete User from Samba ynh_exec_warn_less smbpasswd -x $app -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - # Remove the log files ynh_secure_remove --file="/etc/smb/smb.d/$app.conf" ynh_secure_remove --file="/etc/avahi/services/$app.service" diff --git a/scripts/upgrade b/scripts/upgrade index a4422ca..b74df1e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,8 +22,8 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 -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" +ynh_add_config --template="smb.conf" --destination="/etc/smb/smb.d/$app.conf" +ynh_add_config --template="avahi-samba.service" --destination="/etc/avahi/services/$app.service" samba_sysadmin_update samba_sysadmin_add