#!/bin/bash

# désactivation du shell pour www-data
container_path_web=$(CreoleGet container_path_web)
if [ -n "$container_path_web" ];then
    CHROOT="chroot $container_path_web"
else
    CHROOT=""
fi
TUSER="www-data"
NEWSHELL="/bin/false"
OLDSHELL="`$CHROOT getent passwd $TUSER|awk -F: '{ print $7 }'`"
[ ! "$OLDSHELL" = "$NEWSHELL" ] && $CHROOT usermod -s $NEWSHELL $TUSER

exit 0
