diff --git a/bashbot.sh b/bashbot.sh index 60ff4d5..6842e4a 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.35-dev-12-g47cab80 +#### $$VERSION$$ v1.35-dev-13-gbc414ee ################################################################## # emmbeded system may claim bash but it is not @@ -1137,11 +1137,12 @@ bot_init() { printf "Mycommands.sh not found, copy ${GREY}mycommands.sh.dist${NC} to mycommands.sh? (y/N) N\b" read -r ANSWER [[ "${ANSWER}" =~ ^[Yy] ]] && cp -f "${BASHBOT_ETC:-.}/mycommands.sh.dist" "${BASHBOT_ETC:-.}/mycommands.sh" - fi - if [ ! -r "${BASHBOT_ETC:-.}/mycommands.conf" ]; then - printf "Mycommands config file not found, copy ${GREY}mycommands.conf.dist${NC} to mycommands.conf? (y/N) N\b" - read -r ANSWER - [[ "${ANSWER}" =~ ^[Yy] ]] && cp -f "${BASHBOT_ETC:-.}/mycommands.conf.dist" "${BASHBOT_ETC:-.}/mycommands.conf" + # offer to copy config also + if [ ! -r "${BASHBOT_ETC:-.}/mycommands.conf" ]; then + printf "Mycommands config file not found, copy ${GREY}mycommands.conf.dist${NC} to mycommands.conf? (y/N) N\b" + read -r ANSWER + [[ "${ANSWER}" =~ ^[Yy] ]] && cp -f "${BASHBOT_ETC:-.}/mycommands.conf.dist" "${BASHBOT_ETC:-.}/mycommands.conf" + fi fi # adjust permissions printf "Adjusting files and permissions for user \"${touser}\" ...\n"