1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/timemachine_ynh.git synced 2024-09-03 20:26:33 +02:00
This commit is contained in:
Éric Gaspar 2023-12-21 18:13:51 +01:00
parent b026b965e2
commit 208984c1c3
7 changed files with 8 additions and 33 deletions

View file

@ -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

View file

@ -1,7 +1,6 @@
* Any known limitations, constrains or stuff not working, such as (but not limited to): * 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 * 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) * 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: * Connecting manually:
* The connection string format is also sent via e-mail `smb://timemachine:password@IP_OR_DOMAIN/timemachine` * 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 * 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

View file

@ -1,4 +1,3 @@
Time Machine was successfully installed :)
Your connection string is: Your connection string is:
smb://__APP__:__PASSWORD__@YOUR_IP/__APP__ 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

View file

@ -2,8 +2,8 @@ packaging_format = 2
id = "timemachine" id = "timemachine"
name = "Time Machine" name = "Time Machine"
description.en = "Application to configure the server as a Time Machine backup target" description.en = "Configure the server as a Time Machine backup target"
description.fr = "Application pour configurer le serveur comme cible de sauvegarde Time Machine" description.fr = "Configurer le serveur comme cible de sauvegarde Time Machine"
version = "1.0~ynh5" version = "1.0~ynh5"

View file

@ -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 ynh_script_progression --message="Adding a configuration file..." --weight=1
samba_sysadmin_setup samba_sysadmin_setup
ynh_add_config --template="../conf/smb.conf" --destination="/etc/smb/smb.d/$app.conf" ynh_add_config --template="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="avahi-samba.service" --destination="/etc/avahi/services/$app.service"
# Create a samba user # Create a samba user
(echo "$password"; echo "$password") | ynh_exec_warn_less smbpasswd -s -a "$app" (echo "$password"; echo "$password") | ynh_exec_warn_less smbpasswd -s -a "$app"
@ -46,7 +46,7 @@ samba_sysadmin_add
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # 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 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=smbd --action="reload"
ynh_systemd_action --service_name=avahi-daemon --action="restart" 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 # END OF SCRIPT
#================================================= #=================================================

View file

@ -29,21 +29,9 @@ then
yunohost service remove avahi-daemon yunohost service remove avahi-daemon
fi fi
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Delete User from Samba # Delete User from Samba
ynh_exec_warn_less smbpasswd -x $app 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 # Remove the log files
ynh_secure_remove --file="/etc/smb/smb.d/$app.conf" ynh_secure_remove --file="/etc/smb/smb.d/$app.conf"
ynh_secure_remove --file="/etc/avahi/services/$app.service" ynh_secure_remove --file="/etc/avahi/services/$app.service"

View file

@ -22,8 +22,8 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 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="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="avahi-samba.service" --destination="/etc/avahi/services/$app.service"
samba_sysadmin_update samba_sysadmin_update
samba_sysadmin_add samba_sysadmin_add