commit ed9d9391492d000b61941b126d780708de90a925
Author: Rafael J. García Perdigón <root@RafaDebian.gobex.pri>
Date:   Fri Jun 7 10:52:09 2019 +0200

    Modified linex-ocs

diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/changelog b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/changelog
index debf7d4..c33c99c 100644
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/changelog
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/changelog
@@ -1,3 +1,9 @@
+linex-ocsinventory-agent (1.1) linex; urgency=medium
+
+  * Avoid send lots of data (software...)
+
+ -- Rafael J. García Perdigón <rafael.garciap@juntaex.es>  Fri, 07 Jun 2019 08:05:43 +0200
+
 linex-ocsinventory-agent (1.0) linex; urgency=medium
 
   * Initial Release.
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/control b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/control
index ccf4ea0..7ce2dce 100644
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/control
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/control
@@ -7,6 +7,6 @@ Standards-Version: 3.9.4
 
 Package: linex-ocsinventory-agent
 Architecture: all
-Depends: ocsinventory-agent
+Pre-Depends: ocsinventory-agent
 Description: Configuración de ocsinventory para linex-Xubuntu
  Configuración de ocsinventory para linex-Xubuntu.
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/linex-ocsinventory-agent.links b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/linex-ocsinventory-agent.links
index b52c7ae..5ccae1b 100644
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/linex-ocsinventory-agent.links
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/linex-ocsinventory-agent.links
@@ -1 +1,2 @@
-/usr/share/linex-ocsinventory/ocsinventory-agent.cfg /etc/ocsinventory/ocsinventory-agent.cfg
+/usr/share/linex-ocsinventory-agent/ocsinventory-agent.cfg /etc/ocsinventory/ocsinventory-agent.cfg
+/usr/share/linex-ocsinventory-agent/ocsinventory-agent     /etc/cron.daily/ocsinventory-agent
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postinst b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postinst
index b192178..4062bb9 100755
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postinst
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postinst
@@ -14,6 +14,6 @@ if ! [ -z "$tag" ] ;then
 fi
 
 [ -d /var/lib/ocsinventory-agent/ ] && rm -r /var/lib/ocsinventory-agent/
-ocsinventory-agent
+ocsinventory-agent --lazy --nosoftware
 
 exit 0
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postrm b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postrm
index fe771df..380961d 100755
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postrm
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/postrm
@@ -14,7 +14,10 @@ remove_divert() {
 
 
 if [ "$1" = remove ]; then
+  mv "$SHAREDIR/ocsinventory-agent-pre-linex-ocsinventory-agent" /etc/cron.daily/
+
   remove_divert /etc/ocsinventory/ocsinventory-agent.cfg
+  remove_divert /etc/cron.daily/ocsinventory-agent
 fi
 
 [ -d /var/lib/ocsinventory-agent/ ] && rm -r /var/lib/ocsinventory-agent/
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/preinst b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/preinst
index 668dafd..f2764eb 100755
--- a/ubuntu/bionic/all/linex-ocsinventory-agent/debian/preinst
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/debian/preinst
@@ -12,5 +12,7 @@ divert() {
 }
 
 divert /etc/ocsinventory/ocsinventory-agent.cfg
+divert /etc/cron.daily/ocsinventory-agent
+mv /etc/cron.daily/ocsinventory-agent-pre-linex-ocsinventory-agent "$SHAREDIR"
 
 exit 0
diff --git a/ubuntu/bionic/all/linex-ocsinventory-agent/usr/share/linex-ocsinventory-agent/ocsinventory-agent b/ubuntu/bionic/all/linex-ocsinventory-agent/usr/share/linex-ocsinventory-agent/ocsinventory-agent
new file mode 100755
index 0000000..23d78ac
--- /dev/null
+++ b/ubuntu/bionic/all/linex-ocsinventory-agent/usr/share/linex-ocsinventory-agent/ocsinventory-agent
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PROG=/usr/bin/ocsinventory-agent --lazy --nosoftware
+#RUNDIR=/var/run
+#ENABLED_FILE=$RUNDIR/ocsinventory-client-enabled
+
+if [ ! -x "$PROG" ]; then
+    exit 0
+fi
+
+#if [ ! -f "$ENABLED_FILE" ]; then
+#    perl -e \
+#       'print localtime()." => Service disabled: not running the cron job\n"'\
+#       >> /var/log/ocsinventory-client/ocsinv.log
+#    exit 0
+#fi
+
+$PROG > /dev/null 2>&1
+
