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
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