13 lines
251 B
Bash
Executable File
13 lines
251 B
Bash
Executable File
#!/bin/bash
|
|
|
|
Script=${1}
|
|
shift
|
|
Params=${*}
|
|
|
|
ScriptDir=$(realpath $(dirname ${0}))
|
|
LogDir=${ScriptDir}/logs
|
|
mkdir -p ${LogDir}
|
|
|
|
Cmd="nohup ${ScriptDir}/${Script} ${Params} > ${LogDir}/$(date '+%Y%m%d_%H%M%S').${Script}.log 2>&1 &"
|
|
print_and_run ${Cmd}
|