diff --git a/Config/Automation/Installs/menu.sh b/Config/Automation/Installs/menu.sh index 9b4ad60..cf248a6 100644 --- a/Config/Automation/Installs/menu.sh +++ b/Config/Automation/Installs/menu.sh @@ -58,11 +58,12 @@ fi bash "${path_local}/${print_array[pick]}.sh" "$path" -chmod +x "${path}/${print_array[pick]}.sh" +chmod +x "${path}/${print_array[pick]}.sh" && echo "脚本执行权限添加成功" || echo "脚本执行权限添加失败" declare cron_job="${cron} ${path}/${print_array[pick]}.sh" +echo "正在配置自动任务" (crontab -l 2>/dev/null | grep -v "${print_array[pick]}.sh") | crontab - (crontab -l 2>/dev/null; echo "$cron_job") | crontab - -systemctl restart cron 2>> /dev/null || echo "自动任务重启失败" +systemctl restart cron 2>> /dev/null && echo "自动任务配置成功" || echo "自动任务重启失败" echo "配置完成" \ No newline at end of file diff --git a/Config/Docker/image.sh b/Config/Docker/image.sh index 39a8950..5ec1459 100644 --- a/Config/Docker/image.sh +++ b/Config/Docker/image.sh @@ -21,7 +21,9 @@ case $pick in read -p "请输入:" pick for i in $pick ; do if [[ $i =~ [1-$docker_number] ]]; then + echo "正在停止 ${docker_arr[$(( i -1 ))]}" docker stop "${docker_arr[$(( i -1 ))]}" + echo "${docker_arr[$(( i -1 ))]} 已经停止" fi done ;; diff --git a/Config/Docker/software.sh b/Config/Docker/software.sh index 21f2ab5..3769239 100644 --- a/Config/Docker/software.sh +++ b/Config/Docker/software.sh @@ -3,11 +3,11 @@ echo "1.查看已经安装的站点" echo "2.删除软件" declare pick -read -p "请输入" pick +read -p "请输入:" pick declare path="/var/www" echo "请输入站点安装地址,默认${path}" -read -p "请输入" path +read -p "请输入:" path if [[ -z $path ]]; then path="/var/www" @@ -19,6 +19,9 @@ fi case $pick in '1') for i in "$path"/* ; do + if [[ $i == "${path}/*" ]];then + echo "该地址不存在站点" + fi echo $i done ;; @@ -35,9 +38,11 @@ case $pick in read -p "请输入要删除的序号,多个用 空格 隔开:" site_name for i in $site_name ; do if [[ $i =~ [1-${#site_arr[*]}] ]]; then + echo "开始删除 ${site_arr[$i]}" cd "$path/${site_arr[$i]}" - docker compose down - rm -rf "$path/${site_arr[$i]}" + docker compose down &> /dev/null && echo "站点已经停止运行" + rm -rf "$path/${site_arr[$i]}" &> /dev/null + echo "删除完成" fi done echo "删除完成" diff --git a/Config/Docker/source.sh b/Config/Docker/source.sh index 4490317..4d10d86 100644 --- a/Config/Docker/source.sh +++ b/Config/Docker/source.sh @@ -34,8 +34,10 @@ case $pick in echo "输入错误" exit fi + echo "正在写入配置文件" echo "{\"registry-mirrors\": [\"${url}\"]}" > "/etc/docker/daemon.json" - systemctl restart docker 2>> /dev/null|| echo "docker 重启失败"&&exit + echo "正在重启docker" + systemctl restart docker 2>> /dev/null || echo "docker 重启失败"&&exit echo "换源成功" ;; diff --git a/Config/Manage/install.sh b/Config/Manage/install.sh index 3f99dfa..bd75c6e 100644 --- a/Config/Manage/install.sh +++ b/Config/Manage/install.sh @@ -91,4 +91,4 @@ alias tool="$path/linuxtool/run.sh" echo "工具箱已经安装成功" echo "位置:${path}/linuxtool" echo "命令:tool" -kill $PPID \ No newline at end of file +kill $PPID $> /dev/null \ No newline at end of file diff --git a/Config/Manage/unInstall.sh b/Config/Manage/unInstall.sh index b18ca8c..efaea7c 100644 --- a/Config/Manage/unInstall.sh +++ b/Config/Manage/unInstall.sh @@ -19,4 +19,4 @@ fi sed -i '/alias tool.*/d' "/etc/profile" echo "脚本已经卸载完整,公众号 lsy22 可以获取一键安装脚本" -kill $PPID \ No newline at end of file +kill $PPID $> /dev/null \ No newline at end of file diff --git a/Config/Other/language.sh b/Config/Other/language.sh index ee2f940..ae0329a 100644 --- a/Config/Other/language.sh +++ b/Config/Other/language.sh @@ -16,6 +16,7 @@ else echo "暂不支持该系统一键更换语言" exit fi +echo "正在更新配置文件" sed -i '/^#/! s/^/# /' /etc/locale.gen if ! grep LC_ALL /etc/default/locale &> /dev/null; then echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale