#!/bin/sh # Detects which language is set _langrc=0 echo $LANGUAGE | grep -q "^qcv_ES" || _langrc=1 if [ $_langrc -eq 1 ] ; then MSG="Debe reiniciar la sesiĆ³n de usuario para aplicar los cambios de su grupo lliurex-amic." else MSG="Cal que reinicieu la sessiĆ³ d'usuari per aplicar els canvis del vostre grup lliurex-amic." fi # Create and copy directories echo "Copying xsd and examples to /var/lib/lliurex-amic" cp /usr/share/lliurex-amic/xsd/themes.xsd /var/lib/lliurex-amic/xml/themes/xsd/ cp /usr/share/lliurex-amic/xsd/cathegory.xsd /var/lib/lliurex-amic/xml/galleries/xsd/ cp /usr/share/lliurex-amic/xsd/grid.xsd /var/lib/lliurex-amic/xml/grids/xsd/ cp /usr/share/lliurex-amic/examples/themes/themes.xml /var/lib/lliurex-amic/xml/themes/ cp /usr/share/lliurex-amic/examples/galleries/LliureX-Amic-Example.xml /var/lib/lliurex-amic/xml/galleries/ cp /usr/share/lliurex-amic/examples/galleries/Menus.xml /var/lib/lliurex-amic/xml/galleries/ mkdir /var/lib/lliurex-amic/xml/grids/Menus.AmicMenu cp /usr/share/lliurex-amic/examples/grids/Menus.AmicMenu/* /var/lib/lliurex-amic/xml/grids/Menus.AmicMenu/ # Create new group lliurex-amic and add the user to it echo "Adding $SUDO_USER to new group lliurex-amic" if [ $?=2 ]; then echo "lliurex-amic exists" else groupadd lliurex-amic fi if [ -n "$SUDO_USER" ] ; then usermod -a -G lliurex-amic $SUDO_USER fi echo "Adding permissons" # Adding permissons and ownsership to new directories chgrp -R lliurex-amic /var/lib/lliurex-amic ## hmod -R 775 /var/lib/lliurex-amic # Only when we could make user aministration for lliurex-amic chmod -R 777 /var/lib/lliurex-amic echo "Finishes postinst" notify-send "$MSG" # Only when we could make user aministration for lliurex-amic #DEBHELPER# exit 0