#!/bin/bash
UN="$(cat /etc/workuser)"
HD="/home/$UN"
if [[ -e "$HD/.setupdone" ]]; then
sleep 86400;
exit
fi
sudo \
--set-home \
--non-interactive \
-u $UN \
bash ./usersetup.sh && \
touch $HD/.setupdone