-# We check to see if the user privoxy exists.
-# If it does, we do nothing
-# If we don't, we check to see if the user junkbust exist and, in case it
-# does, we change it do junkbuster. If it also does not exist, we create the
-# privoxy user -- morcego
-id privoxy > /dev/null 2>&1
+# This is where we handle old usernames (junkbust and junkbuster)
+# I'm not sure we should do that, but this is the way we have been
+# doing it for some time now -- morcego
+# We should do it for the group as well -- morcego
+# Doing it by brute force. Much cleaner (no more Mr. Nice Guy) -- morcego
+
+# Change the group name. Remove anything left behind.
+groupmod -n %{name} %{oldname} > /dev/null 2>&1 ||:
+groupmod -n %{name} %{veryoldname} > /dev/null 2>&1 ||:
+groupdel %{oldname} > /dev/null 2>&1 ||:
+groupdel %{veryoldname} > /dev/null 2>&1 ||:
+
+# Same for username
+usermod -l %{name} -d %{_sysconfdir}/%{name} -s "" %{oldname} > /dev/null 2>&1 || :
+usermod -l %{name} -d %{_sysconfdir}/%{name} -s "" %{veryoldname} > /dev/null 2>&1 || :
+userdel %{oldname} > /dev/null 2>&1 ||:
+userdel %{veryoldname} > /dev/null 2>&1 ||:
+
+# Check to see if everything is okey. Create user if it still does not
+# exist
+id %{name} > /dev/null 2>&1