mirror of
https://github.com/YunoHost-Apps/timemachine_ynh.git
synced 2024-09-03 20:26:33 +02:00
46 lines
1.5 KiB
Bash
Executable file
46 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
#=================================================
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
if ynh_exec_warn_less yunohost service status smbd >/dev/null
|
|
then
|
|
ynh_script_progression --message="Removing smbd service integration..."
|
|
yunohost service remove smbd
|
|
fi
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
if ynh_exec_warn_less yunohost service status avahi-daemon >/dev/null
|
|
then
|
|
ynh_script_progression --message="Removing avahi-daemon service integration..."
|
|
yunohost service remove avahi-daemon
|
|
fi
|
|
|
|
# Delete User from Samba
|
|
ynh_exec_warn_less smbpasswd -x $app
|
|
|
|
# Remove the log files
|
|
ynh_secure_remove --file="/etc/smb/smb.d/$app.conf"
|
|
ynh_secure_remove --file="/etc/avahi/services/$app.service"
|
|
|
|
samba_sysadmin_update
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|