dtfscript: Move to dedicated folder

This commit is contained in:
Salt 2018-09-27 20:48:37 -05:00
parent 28817a4542
commit df9bf53a9d
20 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@
# SOFTWARE. # SOFTWARE.
# Load session startup script # Load session startup script
dtfscript=$HOME/.config/dtfscripts/dtfscript dtfscript="$HOME/.dtfscripts/dtfscript"
if [[ -x "$dtfscript" ]]; then if [[ -x "$dtfscript" ]]; then
source "$dtfscript" source "$dtfscript"
exit 0 exit 0

View File

@ -63,12 +63,12 @@ if [[ "$XDG_RUNTIME_DIR" == "" ]]; then
fi fi
## Set some more variables ## Set some more variables
export DTF_CONFIG_HOME="$XDG_CONFIG_HOME/dtfscripts" export DTF_HOME="$HOME/.dtfscripts"
export DTF_SERVICES_DIR="$DTF_CONFIG_HOME/services" export DTF_SERVICES_DIR="$DTF_HOME/services"
export DTF_TASKS_DIR="$DTF_CONFIG_HOME/tasks" export DTF_TASKS_DIR="$DTF_HOME/tasks"
## Load device-specific scripts ## Load device-specific scripts
if [[ -x "$DTF_CONFIG_HOME/devices/$(hostname).rc" ]]; then if [[ -x "$DTF_HOME/devices/$(hostname).rc" ]]; then
dtf_log "Sourcing devices/$(hostname).rc" dtf_log "Sourcing devices/$(hostname).rc"
source $HOME/.config/dtfscripts/devices/$(hostname).rc source $HOME/.config/dtfscripts/devices/$(hostname).rc
fi fi
@ -98,7 +98,7 @@ function dtf_task_run() {
dtf_log "Task is unexecutable: $task" dtf_log "Task is unexecutable: $task"
exit 1 exit 1
fi fi
source "$DTF_CONFIG_HOME/common_task.sh" source "$DTF_HOME/common_task.sh"
source "$task_full" source "$task_full"
) )
} }
@ -139,7 +139,7 @@ function dtf_service_start() {
service_full="$DTF_SERVICES_DIR/$1" service_full="$DTF_SERVICES_DIR/$1"
dtf_service_validate $1 || return 1 dtf_service_validate $1 || return 1
( (
source "$DTF_CONFIG_HOME/common_service.sh" source "$DTF_HOME/common_service.sh"
source "$service_full" source "$service_full"
isup && [[ "$service_kill_on_reload" == "true" ]] && stop isup && [[ "$service_kill_on_reload" == "true" ]] && stop
prestart || exit 1 prestart || exit 1