added guhd.postinst and added license to initscript
This commit is contained in:
parent
ba8badb5ea
commit
4db0fc715e
@ -1,4 +1,25 @@
|
|||||||
#! /bin/sh
|
#! /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 <http://www.gnu.org/licenses/>. #
|
||||||
|
# #
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: guhd
|
# Provides: guhd
|
||||||
# Required-Start: $remote_fs $syslog
|
# Required-Start: $remote_fs $syslog
|
||||||
@ -12,7 +33,6 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Author: Simon Stuerz <simon.stuerz@guh.guru>
|
# Author: Simon Stuerz <simon.stuerz@guh.guru>
|
||||||
|
|
||||||
# Do NOT "set -e"
|
# Do NOT "set -e"
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
|
|||||||
36
debian/guhd.postinst
vendored
Executable file
36
debian/guhd.postinst
vendored
Executable file
@ -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 <http://www.gnu.org/licenses/>. #
|
||||||
|
# #
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user