#!/bin/sh if [ "$2" = "POST-INSTALL" ]; then if fgrep -q battery-shutdown.sh /etc/rc.local; then printf "Converting battery-shutdown service to cron job...\n" sed -i '' -e 's|^/.*battery-shutdown.sh|# &|' /etc/rc.local mkdir -p ${PKG_PREFIX}/etc/cron.d cp ${PKG_PREFIX}/share/desktop-installer/battery-shutdown.cron ${PKG_PREFIX}/etc/cron.d/battery-shutdown fi fi