#!/bin/bash

current_user=$(echo $USER)
target_group="seat"

post_install() {
	if ! getent group seat > /dev/null; then
		groupadd --system seat
	fi
	if ! id -nG ${current_user} | grep -qw ${target_group}; then
		usermod -aG ${target_group} ${current_user}
	fi
}

post_upgrade() {
	if ! getent group seat> /dev/null; then
		groupadd --system seat
	fi
	if ! id -nG ${current_user} | grep -qw ${target_group}; then
		usermod -aG ${target_group} ${current_user}
	fi
}
