Updated post and pre scripts
ogrepository/pipeline/tag This commit looks good
Details
ogrepository/pipeline/tag This commit looks good
Details
parent
b77aa1fc4d
commit
4316217faa
|
@ -73,6 +73,15 @@ done
|
|||
cp /opt/opengnsys/ogrepository/etc/sudoers.d/opengnsys-repository /etc/sudoers.d/opengnsys
|
||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||
echo "Actualización desde la versión $2"
|
||||
# Recopy static files without configuration
|
||||
cp /opt/opengnsys/ogrepository/etc/sudoers.d/opengnsys-repository /etc/sudoers.d/opengnsys
|
||||
OPENGNSYS_HOME=$(getent passwd opengnsys | cut -d: -f6)
|
||||
# Create .ssh directory
|
||||
mkdir -p $OPENGNSYS_HOME/.ssh
|
||||
# Copy ssh keys
|
||||
cp /opt/opengnsys/ogrepository/etc/opengnsys $OPENGNSYS_HOME/.ssh/id_ed25519
|
||||
cp /opt/opengnsys/ogrepository/etc/opengnsys.pub $OPENGNSYS_HOME/.ssh/id_ed25519.pub
|
||||
|
||||
fi
|
||||
|
||||
# Cambiar la propiedad de los archivos al usuario especificado
|
||||
|
|
|
@ -44,11 +44,18 @@ case "$1" in
|
|||
rm -f /var/lib/dpkg/info/ogrepository.post-invoke
|
||||
fi
|
||||
|
||||
# Remove sudoers file
|
||||
if [ -f /etc/sudoers.d/opengnsys-repository ]; then
|
||||
echo "Removing sudoers file..."
|
||||
rm -f /etc/sudoers.d/opengnsys-repository
|
||||
fi
|
||||
|
||||
echo "Limpieza completada."
|
||||
;;
|
||||
|
||||
upgrade|deconfigure)
|
||||
# No hacer nada en actualización o desconfiguración
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
Loading…
Reference in New Issue