#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # STANDARD REMOVE #================================================= # 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 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 #================================================= # 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" samba_sysadmin_update #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Removal of $app completed" --last