From b43a1e6d56c56699455e9c45e947d270bea4f5e5 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 28 Apr 2008 03:35:01 +0200 Subject: [PATCH] Added a Debain init script to contrib. --- contrib/debian-init.d-doldacond | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 contrib/debian-init.d-doldacond diff --git a/contrib/debian-init.d-doldacond b/contrib/debian-init.d-doldacond new file mode 100755 index 0000000..caf7558 --- /dev/null +++ b/contrib/debian-init.d-doldacond @@ -0,0 +1,43 @@ +#!/bin/sh + +PATH=/usr/local/bin:/usr/local/sbin:$PATH + +. /lib/lsb/init-functions + +start() { + LANG=en_US.UTF-8 + export LANG + log_begin_msg "Starting Dolda Connect daemon..." + start-stop-daemon -S -p /var/run/doldacond.pid -qx /usr/local/bin/doldacond -- -s -p /var/run/doldacond.pid + log_end_msg $? +} + +stop() { + log_begin_msg "Stopping Dolda Connect daemon..." + start-stop-daemon -K -p /var/run/doldacond.pid -qx /usr/local/bin/doldacond + log_end_msg $? +} + +reload() { + log_begin_msg "Reloading Dolda Connect daemon..." + start-stop-daemon -K -p /var/run/doldacond.pid -qx /usr/local/bin/doldacond -s HUP + log_end_msg $? +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload) + reload + ;; + restart) + stop + start + ;; +esac + +exit 0 -- 2.11.0