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 +