work/root/etc/service/runtime-setup-user/run

14 lines
198 B
Bash

#!/bin/bash
UN="$(cat /etc/workuser)"
HD="/home/$UN"
if [[ -e "$HD/.setupdone" ]]; then
sleep 86400;
exit
fi
sudo -l -u $UN /bin/bash << EOF
echo "user setup done" > ~/.setupdone
EOF