- 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 "$INSTDIR/oridesti.txt" "$OWNCONFDIR"
+ fi
+ if [ ! -f "$OWNCONFDIR/umbrales.param" ]; then
+ cp "$INSTDIR/umbrales.param" "$OWNCONFDIR"
+ fi
+ if [ ! -f "$OWNCONFDIR/umbrales.id" ]; then
+ echo 0 >> "$OWNCONFDIR/umbrales.id"
+ fi
+ if [ ! -f "$OWNCONFDIR/util.sh" ]; then
+ cp "$INSTDIR/util.sh" "$OWNCONFDIR"
+ fi