Enhance configuration handling in piscal_launcher.sh and improve working directory resolution in piscal_manager.sh. Added fallback mechanisms for configuration files and refined error handling for directory checks.
This commit is contained in:
@@ -19,9 +19,17 @@ cleaned_input_directory_name="clninput"
|
||||
touser_directory_name="fitresult/touser"
|
||||
nottouser_directory_name="fitresult/nottouser"
|
||||
|
||||
# import the settings from piscal.cfg
|
||||
# import the settings from piscal_launcher.cfg
|
||||
# $piscal_executable and $storage_directory
|
||||
. "$base_directory/piscal_launcher.cfg"
|
||||
piscal_launcher_cfg="$base_directory/piscal_launcher.cfg"
|
||||
if [ ! -f "$piscal_launcher_cfg" ]; then
|
||||
piscal_launcher_cfg="/srv/piscal_launcher.cfg"
|
||||
fi
|
||||
if [ ! -f "$piscal_launcher_cfg" ]; then
|
||||
echo "piscal_launcher.cfg not found"
|
||||
exit 1
|
||||
fi
|
||||
. "$piscal_launcher_cfg"
|
||||
|
||||
while getopts "hd:f:u:t" opt; do
|
||||
case "$opt" in
|
||||
@@ -100,7 +108,10 @@ if [ -z "$suppress_storage_copy" ]; then
|
||||
cp "$output_directory_nottouser"/* "$storage_directory"/output/ 2>/dev/null
|
||||
cp "$cleaned_input_directory"/* "$storage_directory"/input/ 2>/dev/null
|
||||
|
||||
mv_script=$base_directory/subdir_year.sh
|
||||
mv_script="$base_directory/subdir_year.sh"
|
||||
if [ ! -f "$mv_script" ]; then
|
||||
mv_script="/srv/subdir_year.sh"
|
||||
fi
|
||||
pushd "$storage_directory"/output >> /dev/null
|
||||
"$mv_script"
|
||||
popd >> /dev/null
|
||||
|
||||
Reference in New Issue
Block a user