unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sree Harsha Totakura <sreeharsha@totakura.in>
Cc: guix-devel@gnu.org
Subject: Re: Guix initd script
Date: Wed, 15 Jan 2014 23:15:34 +0100	[thread overview]
Message-ID: <52D70886.3000602@totakura.in> (raw)
In-Reply-To: <87a9exxcc7.fsf@karetnikov.org>


[-- Attachment #1.1: Type: text/plain, Size: 141 bytes --]


On 01/15/2014 08:40 PM, Nikita Karetnikov wrote:
> Could you add a license header?

Ok, attached the file with license header.

Sree

[-- Attachment #1.2: guixd --]
[-- Type: text/plain, Size: 2390 bytes --]

#!/bin/sh

### BEGIN INIT INFO
# Provides:          guix-daemon
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the guix-daemon
# Description:       starts guix-daemon using start-stop-daemon
### END INIT INFO
#
# Author:    Sree Harsha Totakura <sreeharsha@totakura.in> using lightdm script
#            from Yves-Alexis Perez <corsac@debian.org>
#
# License:
# (C) 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3, or (at your
# option) any later version.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNUnet; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.


PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/guix-daemon
DAEMON_OPTS="--build-users-group=guix-builder --cores=0"
NAME=guixd
DESC=guix-daemon

test -x $DAEMON || exit 0

set -e

. /lib/lsb/init-functions


case "$1" in
	start)
		echo -n "Starting $DESC: "
		start-stop-daemon --start --background --make-pidfile \
		    --quiet --pidfile /var/run/$NAME.pid \
		    --exec $DAEMON -- $DAEMON_OPTS || true
		echo "$NAME."
		;;

	stop)
		echo -n "Stopping $DESC: "
		start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
		    --exec $DAEMON || true
		echo "$NAME."
		;;

	restart)
		echo -n "Restarting $DESC: "
		start-stop-daemon --stop --quiet --pidfile \
		    /var/run/$NAME.pid --exec $DAEMON || true
		sleep 1
		start-stop-daemon --start --background --make-pidfile \
		    --quiet --pidfile \
		    /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true
		echo "$NAME."
		;;

	status)
		status_of_proc -p /var/run/$NAME.pid "$DAEMON" "$NAME" && exit 0 || exit $?
		;;
	*)
		echo "Usage: $NAME {start|stop|restart|status}" >&2
		exit 1
		;;
esac

exit 0

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2014-01-15 22:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 13:55 Guix initd script Sree Harsha Totakura
2014-01-15 15:22 ` Ludovic Courtès
2014-01-15 15:47   ` Sree Harsha Totakura
2014-01-15 19:40 ` Nikita Karetnikov
2014-01-15 22:15   ` Sree Harsha Totakura [this message]
2014-01-15 20:41 ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D70886.3000602@totakura.in \
    --to=sreeharsha@totakura.in \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).