From 4db0fc715e5469d9f71d56bea69ecdc131bb67e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 13 Feb 2015 10:47:38 +0100 Subject: [PATCH] added guhd.postinst and added license to initscript --- data/init/guhd | 22 +++++++++++++++++++++- debian/guhd.postinst | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 debian/guhd.postinst diff --git a/data/init/guhd b/data/init/guhd index 7e4182ce..6e3d01e7 100644 --- a/data/init/guhd +++ b/data/init/guhd @@ -1,4 +1,25 @@ #! /bin/sh + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# Copyright (C) 2015 guh # +# # +# This file is part of guh. # +# # +# guh 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, version 2 of the License. # +# # +# guh 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 guh. If not, see . # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + ### BEGIN INIT INFO # Provides: guhd # Required-Start: $remote_fs $syslog @@ -12,7 +33,6 @@ ### END INIT INFO # Author: Simon Stuerz - # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script diff --git a/debian/guhd.postinst b/debian/guhd.postinst new file mode 100755 index 00000000..8366d62e --- /dev/null +++ b/debian/guhd.postinst @@ -0,0 +1,36 @@ +#!/bin/sh + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# Copyright (C) 2015 guh # +# # +# This file is part of guh. # +# # +# guh 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, version 2 of the License. # +# # +# guh 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 guh. If not, see . # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +# restart the guh daemon after update if it's running +service guhd status > /dev/null 2>&1 +if [ $? -eq 0 ]; then + echo -n "Restart guh daemon..." + service guhd restart + if [ $? -eq 0 ]; then + echo "OK!" + else + echo "FAIL!" + fi +fi + +exit 0 +