lib.sh 363 B

12345678910111213141516
  1. # Library to be sourced by download.d/abort.d scripts
  2. stop() {
  3. if [ -x /etc/init.d/$1 ]; then
  4. echo "Stopping $1..."
  5. /etc/init.d/$1 stop
  6. fi
  7. }
  8. start_enabled() {
  9. if [ -x /etc/init.d/$1 ] && /etc/init.d/$1 enabled; then
  10. echo "Starting $1..."
  11. /etc/init.d/$1 start
  12. fi
  13. }