var fs = require("fs"); var parse = require("url").parse; var path = require("path"); try { fs.mkdirSync("./tmp"); } catch (e) { if (e.code != "EEXIST") throw e; } function local(url) { return path.join("./tmp", encodeURIComponent(url)); } function read(url) { return fs.createReadStream(local(url)); } module.exports = function(url, callback) { var result = read(url); result.on("error", function(e) { if (e.code != "ENOENT") return callback(e); var options = parse(url); options.rejectUnauthorized = false; require(options.protocol.slice(0, -1)).get(options, function(res) { if (res.statusCode !== 200) return callback(res.statusCode); res.pipe(fs.createWriteStream(local(url))); callback(null, res); }); }).on("open", function() { callback(null, result); }); }; option> Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/spice.scm
AgeCommit message (Expand)Author
2021-05-06services: spice-vdagent: Clear the socket file prior to starting....This fixes the following issue where spice-vdagent would fail to start if the spice-vdagent-sock socket file already existed: spice-vdagentd: Fatal could not create the server socket /run/spice-vdagentd/spice-vdagent-sock: Error binding to address: Address already in use The requirement is also modified to depend on dbus-system, a cue taken from upstream's own systemd service file (see 'data/spice-vdagentd.service' in the sources). * gnu/services/spice.scm (spice-vdagent-activation): Delete procedure. (spice-vdagent-shepherd-service): Fix indentation. [requirement]: Replace udev by dbus-system. [start]: Ensure the spice-vdagentd run-time directory exists and that the spice-vdagent-sock socket file does *not* exist before forking the daemon. Maxim Cournoyer
2021-05-05services: Fix the spice-vdagent service....* gnu/services/spice.scm (spice-vdagent-activation): Update runtime directory from /var/run/spice-vdagentd to /run/spice-vdagentd. (spice-vdagent-service-type): Specify a default value and fix indentation. Maxim Cournoyer
2020-04-21services: Don't use the deprecated 'make-forkexec-constructor' call....Passing 'make-forkexec-constructor' a string or several string arguments has been deprecated since dmd 0.1. * gnu/services/base.scm (rngd-service-type): In 'start' method, pass a list as the first argument to 'make-forkexec-constructor'. * gnu/services/desktop.scm (bluetooth-shepherd-service): Likewise. * gnu/services/spice.scm (spice-vdagent-shepherd-service): Likewise. Ludovic Courtès
2020-01-26services: Fix typo in spice-vdagent-service....* gnu/services/spice.scm (spice-vdagent-service): Fix typo. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Damien Cassou