diff --git a/conf/netdata-uninstaller.sh b/conf/netdata-uninstaller.sh index cfd858c..6435157 100644 --- a/conf/netdata-uninstaller.sh +++ b/conf/netdata-uninstaller.sh @@ -173,23 +173,23 @@ portable_del_group() { return 1 } -portable_del_user() { - local username="${1}" - echo >&2 "Deleting ${username} user account ..." +# portable_del_user() { +# local username="${1}" +# echo >&2 "Deleting ${username} user account ..." - # Linux - if command -v userdel 1>/dev/null 2>&1; then - run userdel -f "${username}" && return 0 - fi +# # Linux +# if command -v userdel 1>/dev/null 2>&1; then +# run userdel -f "${username}" && return 0 +# fi - # mac OS - if command -v sysadminctl 1>/dev/null 2>&1; then - run sysadminctl -deleteUser "${username}" && return 0 - fi +# # mac OS +# if command -v sysadminctl 1>/dev/null 2>&1; then +# run sysadminctl -deleteUser "${username}" && return 0 +# fi - echo >&2 "User ${username} could not be deleted from system, you might have to remove it manually" - return 1 -} +# echo >&2 "User ${username} could not be deleted from system, you might have to remove it manually" +# return 1 +# } portable_del_user_from_group() { local groupname="${1}" username="${2}" @@ -324,10 +324,10 @@ if [ -n "$NETDATA_ADDED_TO_GROUPS" ]; then done fi -#### REMOVE USER -user_input "Press ENTER to delete 'netdata' system user > " -portable_del_user "netdata" || : +# #### REMOVE USER +# user_input "Press ENTER to delete 'netdata' system user > " +# portable_del_user "netdata" || : -### REMOVE GROUP -user_input "Press ENTER to delete 'netdata' system group > " -portable_del_group "netdata" || : +# ### REMOVE GROUP +# user_input "Press ENTER to delete 'netdata' system group > " +# portable_del_group "netdata" || : diff --git a/scripts/remove b/scripts/remove index 25701bc..09445db 100644 --- a/scripts/remove +++ b/scripts/remove @@ -34,9 +34,10 @@ ynh_script_progression --message="Uninstalling Netdata..." --weight=6 UNINSTALL_SCRIPT="netdata-uninstaller.sh" tmpdir=$(mktemp -d) -ynh_setup_source --dest_dir="$tmpdir" --source_id="uninstaller" +#ynh_setup_source --dest_dir="$tmpdir" --source_id="uninstaller" +cp ../conf/netdata-uninstaller.sh $tmpdir chmod +x $tmpdir/$UNINSTALL_SCRIPT - + # Move outside the directory (which will be removed) pushd $tmpdir # create a temporary file for the log