- cp $INSTDIR/$comando $BINDIR
- cp $INSTDIR/umbrales.param $CONFDIR
- #cp $INSTDIR/*.data $DATADIR/aprocesar
+ cp "$INSTDIR/$comando" "$BINDIR"
+ chmod u+x "$BINDIR/$comando"
+ if [ "$comando" = "afimonio" ]; then
+ cp "$INSTDIR/afimonio_daemon.sh" "$BINDIR"
+ chmod u+x "$BINDIR/afimonio_daemon.sh"
+ fi
+
+ # Copio umbrales, oridesti y utilities una sola vez
+ if [ ! -f "$OWNCONFDIR/oridesti.txt" ]; then
+ cp "$CONFDIR/oridesti.txt" "$OWNCONFDIR"
+ fi
+ if [ ! -f "$OWNCONFDIR/umbrales.param" ]; then
+ cp "$CONFDIR/umbrales.param" "$OWNCONFDIR"
+ fi
+ if [ ! -f "$OWNCONFDIR/umbrales.id" ]; then
+ cp "$CONFDIR/umbrales.id" "$OWNCONFDIR"
+ fi
+ if [ ! -f "$OWNCONFDIR/util.sh" ]; then
+ cp "$INSTDIR/util.sh" "$OWNCONFDIR"
+ fi