From 22cb45ac40a113db375a844b822b850bc7064725 Mon Sep 17 00:00:00 2001 From: kytv Date: Tue, 13 Sep 2011 21:36:41 +0000 Subject: [PATCH] Add explicit "install as a service" support for Debian and its derivatives The upstream script has support for Ubuntu but not Debian. This change allows the same methods used for Ubuntu to be used for Debian. This *should* work for any version of Linux that has Debian in its family tree. --- installer/resources/i2prouter | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index 4d570f3ce..7f080691e 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -1136,8 +1136,8 @@ installdaemon() { sed -i "s/Default-Start: 2 3 4 5/Default-Start: 5/" $0 insserv "/etc/init.d/$APP_NAME" fi - elif [ -f /etc/lsb-release ] ; then - eval echo `gettext 'Detected Ubuntu:'` + elif [ -f /etc/lsb-release -o -f /etc/debian_version ] ; then + eval echo `gettext 'Detected Debian-based distribution:'` if [ -f "/etc/init.d/$APP_NAME" -o -f "/etc/init/${APP_NAME}.conf" ] ; then eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` exit 1 @@ -1328,8 +1328,8 @@ removedaemon() { eval echo `gettext ' The $APP_LONG_NAME daemon is not currently installed.'` exit 1 fi - elif [ -f /etc/lsb-release ] ; then - eval echo `gettext 'Detected Ubuntu:'` + elif [ -f /etc/lsb-release -o -f /etc/debian_version ] ; then + eval echo `gettext 'Detected Debian-based distribution:'` if [ -f "/etc/init.d/$APP_NAME" ] ; then eval echo `gettext ' Removing $APP_LONG_NAME daemon from init.d...'` update-rc.d -f "$APP_NAME" remove