diff --git a/debian/changelog b/debian/changelog index a7337d9..3ac13fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,8 @@ +ogrepository (1.1.0) unstable; urgency=medium + * OgGit + + -- Tu Nombre Tue, 11 Mar 2025 04:43:58 +0000 + ogrepository (1.0.0+deb-packages20250311-1) unstable; urgency=medium * First debian version diff --git a/debian/ogrepository.postinst b/debian/ogrepository.postinst index 0d4a658..b3c217f 100755 --- a/debian/ogrepository.postinst +++ b/debian/ogrepository.postinst @@ -1,7 +1,7 @@ #!/bin/sh set -e -set -x +set -x . /usr/share/debconf/confmodule @@ -19,7 +19,7 @@ SAMBA_PASS="$RET" USER="opengnsys" -# Provisionar base de datos si es necesario en caso de instalación. +# Provisionar base de datos si es necesario en caso de instalación. # Detectar si es una instalación nueva o una actualización @@ -33,7 +33,7 @@ for pkg in bittorrent bittornado ctorrent; do fi done " - + sed -i "s/%%OGREPOSITORY_USER%%/$SAMBA_USER/g" /etc/systemd/system/ogrepo-api.service sed -i "s/%%OGREPOSITORY_USER%%/$SAMBA_USER/g" /etc/samba/ogrepo-smb.conf @@ -49,7 +49,7 @@ done chmod 700 $OPENGNSYS_HOME/.ssh chmod 600 $OPENGNSYS_HOME/.ssh/id_ed25519 chmod 644 $OPENGNSYS_HOME/.ssh/id_ed25519.pub - # Genera authorized_keys + # Genera authorized_keys cat $OPENGNSYS_HOME/.ssh/id_ed25519.pub >> $OPENGNSYS_HOME/.ssh/authorized_keys chmod 600 $OPENGNSYS_HOME/.ssh/authorized_keys chown -R opengnsys:opengnsys $OPENGNSYS_HOME/.ssh @@ -63,18 +63,18 @@ done (echo "$SAMBA_PASS"; echo "$SAMBA_PASS") | smbpasswd -a $SAMBA_USER fi - # Configure Repo + # Configure Repo cp /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg.tmpl /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg sed -i "s/SERVERIP/$OGREPO_IP/g" /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg sed -i "s/OGCOREIP/$OGCORE_IP/g" /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg # Copiar sudoers file ogrepository/etc/opengnsys-repository - cp /opt/opengnsys/ogrepository/etc/opengnsys-repository /etc/sudoers.d/opengnsys + cp /opt/opengnsys/ogrepository/etc/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/opengnsys-repository /etc/sudoers.d/opengnsys-repository + # Recopy static files without configuration + cp /opt/opengnsys/ogrepository/etc/opengnsys-repository /etc/sudoers.d/opengnsys-repository OPENGNSYS_HOME=$(getent passwd opengnsys | cut -d: -f6) # Create .ssh directory mkdir -p $OPENGNSYS_HOME/.ssh @@ -88,8 +88,10 @@ fi # Cambiar la propiedad de los archivos al usuario especificado chown opengnsys:www-data /opt/opengnsys/ chown -R opengnsys:www-data /opt/opengnsys/ogrepository +chmod 755 /opt/opengnsys chmod 755 /opt/opengnsys/ogrepository/bin/* + # Install http server stuff # Reiniciar servicios si es necesario # systemctl restart nombre_del_servicio