screen & gotty – Linux Debian


Debian 9 Live 64bit – installation screen i terminal w przegladarce

 

Source: https://github.com/yudai/gotty

 

Terminal w przegladarce:

Install gotty

apt install gotty

 

gotty top >/dev/null 2>&1 &

 



Xmr-stak uruchomiony w ‘screen’ jako service:

cat > /etc/init.d/xmr-stak << EOF
#!/bin/bash
# chkconfig 235 99 10
### BEGIN INIT INFO
# Provides: System Sixty Six 
# Required-Start:    \$local_fs \$network \$syslog
# Required-Stop:     \$local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: xmr-stak autostart
# Description:       xmr-stak autostart
### END INIT INFO
# Author: Darius Mark <darius@system66.com>
case "\$1" in
  'start')
  /usr/bin/screen -dmS xmr-stak '/stratumos/xmr-stak/xmr-stak' --config /stratumos/xmr-stak/config.txt --poolconf /stratumos/xmr-stak/pools.txt &;;
  'stop')
    echo "pkill xmr-stak"
    pkill xmr-stak
    screen -wipe
    screen -ls;;
  *)
  echo "Usage: $N {start|stop|status}" >&2
  exit 1
  ;;
esac
EOF

 

chmod +x /etc/init.d/xmr-stak
update-rc.d xmr-stak defaults

service xmr-stak start



TODO: gotty’ uruchomiony jako daemon:

gotty screen -x xmr-stak >/dev/null 2>&1 &

TODO: sprobowac jako service?