X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=install.sh;h=3c2e6243d95ad14688536184c80cb417c87628eb;hb=c50ded4690a7b444da94f7fa0d5f3b4c6fee76c1;hp=deb201b9936ed33cbc436dbb798dd56edbbc1ac0;hpb=5043c340d8249a2450ea7bf042d9cfe933ba3ec6;p=breezed.git diff --git a/install.sh b/install.sh index deb201b..3c2e624 100755 --- a/install.sh +++ b/install.sh @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with breezed. If not, see . +PM_SLEEPD_DIR="/usr/lib/pm-utils/sleep.d/" + make -k if [[ ! -a "/etc/breezed.conf" ]]; then @@ -29,7 +31,14 @@ fi cp ./breezed /usr/local/bin/ cp ./breezed.sh /etc/init.d/ -cp ./breezed-pm-utils.sh /usr/lib/pm-utils/sleep.d/50breezed + +if [[ -d "${PM_SLEEPD_DIR}" ]]; then + cp ./breezed-pm-utils.sh ${PM_SLEEPD_DIR}50breezed +else + echo "I can not find ${PM_SLEEPD_DIR}" + echo "On Debian, you should install pm-utils" +fi + cp ./breezed.1 /usr/share/man/man1/ update-rc.d breezed.sh defaults