Automatic commit
authorFrancois Fleuret <francois@fleuret.org>
Thu, 26 Feb 2009 01:05:17 +0000 (02:05 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Thu, 26 Feb 2009 01:05:17 +0000 (02:05 +0100)
install.sh
remove.sh

index deb201b..8ef2445 100755 (executable)
@@ -29,7 +29,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 "/usr/lib/pm-utils/sleep.d/" ]]; then
+    cp ./breezed-pm-utils.sh /usr/lib/pm-utils/sleep.d/50breezed
+else
+    echo "I can not find /usr/lib/pm-utils/sleep.d/"
+    echo "On Debian, you should install pm-utils"
+fi
+
 cp ./breezed.1 /usr/share/man/man1/
 
 update-rc.d breezed.sh defaults
index 386fe0d..8c25377 100755 (executable)
--- a/remove.sh
+++ b/remove.sh
@@ -25,8 +25,5 @@ update-rc.d -f breezed.sh remove
 
 rm /usr/local/bin/breezed
 rm /etc/init.d/breezed.sh
-rm /usr/lib/pm-utils/sleep.d/50breezed
+rm -f /usr/lib/pm-utils/sleep.d/50breezed
 rm /usr/share/man/man1/breezed.1
-
-# rm /etc/acpi/resume.d/99-breezed.sh
-# rm /etc/acpi/suspend.d/01-breezed.sh