Skip to content

Commit

Permalink
confirm to overwrite config files
Browse files Browse the repository at this point in the history
  • Loading branch information
happyfish100 committed May 16, 2024
1 parent 758804c commit c0db871
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shell/fcfs_conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,15 @@ create_fuseclient_conf_files() {
}

create_config_files() {
if [ -d $LOCAL_CONF_PATH/fdir -a -d $LOCAL_CONF_PATH/fstore ]; then
printf 'config files already exist, make sure to overwrite [y/N]: '
read var
if ! [ "$var" = "y" -o "$var" = "Y" -o "$var" = "yes" -o "$var" = "YES" ]; then
echo -e '\ncreating config files aborted!\n'
exit 1
fi
fi

create_path_not_exist $LOCAL_CONF_PATH

if [ $fdir_need_execute -eq 1 ]; then
Expand Down

0 comments on commit c0db871

Please sign in to comment.