aboutsummaryrefslogtreecommitdiff
#!/bin/bash
### BEGIN INIT INFO
# Provides:          guix-daemon
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Guix build daemon
# Description:       Provides a daemon that does builds for Guix
### END INIT INFO

set -e
mkdir -p "/var/run"
if [ ! -f "@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon" ]
then
  exit 5
fi

case "$1" in
start)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    if pgrep -F "/var/run/guix-daemon.pid" guix-daemon
    then
      exit 0
    else
      echo "guix-daemon has a stale pid file" >&2
      exit 1
    fi
  else
    daemonize \
      -a \
      -e "/var/log/guix-daemon-stderr.log" \
      -o "/var/log/guix-daemon-stdout.log" \
      -E GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale \
      -E LC_ALL=en_US.utf8 \
      -p "/var/run/guix-daemon.pid" \
      @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \
      --build-users-group=guixbuild --discover=no \
      --substitute-urls='@GUIX_SUBSTITUTE_URLS@'

  fi
  ;;
stop)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    pkill -F "/var/run/guix-daemon.pid" guix-daemon || {
      exit 1
    }
    rm -f "/var/run/guix-daemon.pid"
    exit 0
  else
    exit 0
  fi
  ;;
status)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    if pgrep -F "/var/run/guix-daemon.pid" guix-daemon
    then
      echo "guix-daemon is running"
      exit 0
    else
      echo "guix-daemon has a stale pid file"
      exit 1
    fi
  else
    echo "guix-daemon is not running"
    exit 3
  fi
  ;;
restart|force-reload)
  "$0" stop
  "$0" start
  ;;
*)
  echo "Usage: $0 (start|stop|status|restart|force-reload)"
  exit 3
  ;;
esac
2:35:30 +0200'>2021-10-07gnu: Add erlang-rebar3-raw-deps....* gnu/packages/erlang.scm (erlang-rebar3-raw-deps): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-proper....* gnu/packages/erlang.scm (erlang-proper): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-jsone....* gnu/packages/erlang.scm (erlang-jsone): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-edown....* gnu/packages/erlang.scm (erlang-edown): New variable. Hartmut Goebel 2021-10-07gnu: Add rebar3....* gnu/packages/erlang.scm (rebar3): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-relx....* gnu/packages/erlang.scm (erlang-relx): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-ssl-verify-fun....* gnu/packages/erlang.scm (erlang-ssl-verify-fun): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-hex-core....* gnu/packages/erlang.scm (erlang-hex-core): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-parse-trans....* gnu/packages/erlang.scm (erlang-parse-trans): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-providers....* gnu/packages/erlang.scm (erlang-providers): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-eunit-formatters....* gnu/packages/erlang.scm (erlang-eunit-formatters): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-getopt....* gnu/packages/erlang.scm (erlang-getopt): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-bbmustache....* gnu/packages/erlang.scm (erlang-bbmustache): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-cth-readable....* gnu/packages/erlang.scm (erlang-cth-readable): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-erlware-commons....* gnu/packages/erlang.scm (erlang-erlware-commons): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-certifi....* gnu/packages/erlang.scm (erlang-certifi): New variable. Hartmut Goebel 2021-10-07gnu: Add erlang-cf....* gnu/packages/erlang.scm (erlang-cf): New variable. Hartmut Goebel 2021-09-21gnu: erlang: Update to 24.0.5....* gnu/packages/erlang.scm (erlang): Update to 24.0.5. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Cees de Groot 2021-07-13gnu: erlang: Remove 'autoconf phase....* gnu/packages/erlang.scm (erlang)[native-inputs]: Remove autoconf, automake. [arguments]: Remove deprecated 'autoconf phase. Remove unneeded 'patch-configure-shell-script. Efraim Flashner 2021-07-13gnu: erlang: Update to 24.0.2....* gnu/packages/erlang.scm (erlang): Update to 24.0.2. [arguments]: Adjust custom 'install-doc phase for changes in manpage input. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Cees de Groot 2021-06-23gnu: Fix references to emacs-build-system's expand-load-path phase....* gnu/packages/emacs-xyz.scm (emacs-pdf-tools)[#:phases]: Use emacs-expand-load-path instead of emacs-add-source-to-load-path. * gnu/packages/erlang.scm (emacs-erlang)[#:phases]: Use expand-load-path instead of add-source-to-load-path. * gnu/packages/protobuf.scm (emacs-protobuf-mode)[#:phases]: Use expand-load-path instead of add-source-to-load-path. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at> Carlo Zancanaro