# subroutines for file operations
#
#
###########################################
ffhal_params_and_files ()
{
##32  echo "v2020.1.3-1-g5bf4c9c+"      >/lib/gluon/gluon-version
  echo "2.4.2~20250318"             >/lib/gluon/release
##32  echo "44ed605+"                   >/lib/gluon/site-version

###  cp -f /tmp/store/mesh.lua                /lib/gluon/status-page/mesh.lua
###  chmod 755 /lib/gluon/status-page/mesh.lua
###  cp -f /tmp/store/neighbours-batadv-prov  /lib/gluon/status-page/providers/neighbours-batadv
###  chmod 755 /lib/gluon/status-page/providers/neighbours-batadv
###  cp -f /tmp/store/neighbours-batadv       /lib/gluon/status-page/www/cgi-bin/dyn/neighbours-batadv
###  chmod 755 /lib/gluon/status-page/www/cgi-bin/dyn/neighbours-batadv

  echo "done.."
}
###########################################
respondd_files ()
{
  v_respond=$(pidof respondd)
  if [ $v_respond ]
  then
    echo -n "respondd stop: "
    /etc/init.d/gluon-respondd stop
    echo ".....ok"
  fi

#  cp -f /tmp/store/gluon-respondd /etc/init.d
#  chmod 755 /etc/init.d/gluon-respondd

  if [ $v_respond ]
  then
    echo -n "respondd start: "
    /etc/init.d/gluon-respondd start
    echo "....ok"
  fi

  echo "files done.."
}
###########################################
dac524_files ()
{
  rm -f /usr/lib/micron.d/dac524*
  cp -f /tmp/store/dac524.sh  /usr/libexec
  chmod 755 /usr/libexec/dac524.sh
  cp -f /tmp/store/dac524     /usr/lib/micron.d
  chmod 644 /usr/lib/micron.d/dac524

  if [ $(pidof micrond) ]
  then
    echo -n "micrond restart: "; /etc/init.d/micrond restart
  fi

  echo "...erledigt!"
}
###########################################
