#! /bin/sh
# postinst script for thunar-shares-plugin on MX Linux for sambashare group

set -e

# add users that are part of the sudoers group to sambashares group
	
	OLDIFS="$IFS"
	IFS=","
	for USER in `getent group sudo | cut -f4 -d:`; do
		adduser "$USER" sambashare \
		|| ! getent passwd "$USER" >/dev/null
	done
	IFS="$OLDIFS"

	printf "\n \e[33;1m You need to logout and back in for changes to take affect \e[0m \n"
exit 0
