1#!/bin/sh 2# Copyright (C) 2017 O.S. Systems Software LTDA. 3# Licensed on MIT 4 5EXEC_DIR=/exec.d # place to look for modules 6 7exec_enabled() { 8 return 0 9} 10 11exec_run() { 12 if [ ! -d $EXEC_DIR ]; then 13 msg "No contents to exec in $EXEC_DIR. Starting shell ..." 14 sh 15 fi 16 17 # Load and run modules 18 for m in $EXEC_DIR/*; do 19 # Skip backup files 20 if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then 21 continue 22 fi 23 24 debug "Starting $m" 25 26 # process module 27 ./$m 28 done 29} 30