more bashing

single-host
Marc Wäckerlin 9 years ago
parent a7139b8fd9
commit 859d13b2e1
  1. 20
      ChangeLog
  2. 10
      ax_init_standard_project.m4
  3. 5
      build-in-docker.sh
  4. 3
      nodejs/etc/servicedock.json
  5. 2
      nodejs/makefile.am
  6. 11
      nodejs/package.json.in
  7. 15
      nodejs/public/javascripts/servicedock.js
  8. 4
      nodejs/servicedock.js

@ -1,3 +1,23 @@
2016-01-25 08:00 marc
* ChangeLog: small fixes
2016-01-25 08:00 marc
* nodejs/public/javascripts/servicedock.js,
nodejs/sockets/index.js: small fixes
2016-01-22 15:50 marc
* nodejs/public/javascripts/servicedock.js, nodejs/servicedock.js,
nodejs/sockets/index.js, nodejs/views/index.ejs: stats displayed;
about to rework bash
2016-01-22 07:52 marc
* nodejs/package.json.in, nodejs/public/javascripts/servicedock.js,
nodejs/sockets/index.js: stats successfully transfered
2016-01-21 15:58 marc 2016-01-21 15:58 marc
* nodejs/public/javascripts/servicedock.js, * nodejs/public/javascripts/servicedock.js,

@ -122,6 +122,16 @@ AC_DEFUN([AX_SUBST], [
# #
# configures the basic environment # configures the basic environment
AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
PREFIX=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${prefix}")
AX_SUBST(PREFIX)
SYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${sysconfdir}")
AX_SUBST(SYSCONFDIR)
DATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${datadir}")
AX_SUBST(DATADIR)
PKGDATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${DATADIR}/${PACKAGE_NAME}")
AX_SUBST(PKGDATADIR)
LOCALSTATEDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${localstatedir}")
AX_SUBST(LOCALSTATEDIR)
AC_MSG_CHECKING([target platfrom]) AC_MSG_CHECKING([target platfrom])
UNIX=1 UNIX=1
MINGW= MINGW=

@ -171,6 +171,11 @@ OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -
docker pull $img docker pull $img
DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity) DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity)
trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT
for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do
docker exec -it ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences"
docker exec -it ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences"
docker exec -it ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences"
done
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS}
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \

@ -0,0 +1,3 @@
{
"port": 8889
}

@ -8,6 +8,8 @@ EXTRA_DIST = servicedock.js package.json.in public routes sockets views
nodejsdir = ${pkgdatadir}/nodejs nodejsdir = ${pkgdatadir}/nodejs
sysconf_DATA = etc/@PACKAGE_NAME@.json
all: node_modules all: node_modules
node_modules: package.json.in node_modules: package.json.in

@ -17,5 +17,14 @@
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "Marc Wäckerlin", "author": "Marc Wäckerlin",
"license": "LGPL3" "license": "LGPL3",
"path": {
"prefix": "@PREFIX@",
"sysconf": "@SYSCONFDIR@",
"pkgdata": "@PKGDATADIR@",
"localstate": "@LOCALSTATEDIR@",
"log": "@LOCALSTATEDIR@/log/@PACKAGE_NAME@.log",
"config": "@SYSCONFDIR@/@PACKAGE_NAME@.json",
"nodejs": "@PKGDATADIR@/nodejs"
}
} }

@ -828,19 +828,22 @@ function bash_data(data) {
if (data.type=='done') { if (data.type=='done') {
$("#screen").append('<span class="'+data.type+'">\nDONE</span>'); $("#screen").append('<span class="'+data.type+'">\nDONE</span>');
} else { } else {
var done = false; var buff = "";
console.log("ASCII: ", ascii(data.text)); console.log("ASCII: ", ascii(data.text));
if (data.text.length==1) { for (var i=0; i<data.text.length; ++i) {
switch (data.text.charCodeAt(0)) { switch (data.text.charCodeAt(i)) {
case 7: case 7:
$('#screen').text(function (_,txt) { case 8:
if (buff.length) $("#screen").append(ansifilter(htmlenc(buff)));
buff = "";
$('#screen').html(function (_,txt) {
return txt.slice(0, -1); return txt.slice(0, -1);
}); });
done = true;
break; break;
default: buff += data.text[i];
} }
} }
if (!done) $("#screen").append(ansifilter(htmlenc(data.text))); if (buff.length) $("#screen").append(ansifilter(htmlenc(buff)));
} }
$("#screen").animate({ $("#screen").animate({
scrollTop: $("#screen").prop('scrollHeight') scrollTop: $("#screen").prop('scrollHeight')

@ -9,6 +9,8 @@ var express = require('express')
var app = module.exports = express.createServer(); var app = module.exports = express.createServer();
var io = require('socket.io').listen(app); var io = require('socket.io').listen(app);
var sockets = require(__dirname+'/sockets')(io); var sockets = require(__dirname+'/sockets')(io);
var package = require(__dirname+'/package.json');
var config = require(package.path.config);
// Configuration // Configuration
@ -34,7 +36,7 @@ app.configure('production', function(){
app.get('/', routes.index); app.get('/', routes.index);
app.listen(8889, function() { app.listen(config.port, function() {
console.log("Express server listening on port %d in %s mode", console.log("Express server listening on port %d in %s mode",
app.address().port, app.settings.env); app.address().port, app.settings.env);
}); });

Loading…
Cancel
Save