写了些没用的提示
This commit is contained in:
parent
d701c45f67
commit
9042706015
@ -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 "配置完成"
|
@ -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
|
||||
;;
|
||||
|
@ -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 "删除完成"
|
||||
|
@ -34,7 +34,9 @@ case $pick in
|
||||
echo "输入错误"
|
||||
exit
|
||||
fi
|
||||
echo "正在写入配置文件"
|
||||
echo "{\"registry-mirrors\": [\"${url}\"]}" > "/etc/docker/daemon.json"
|
||||
echo "正在重启docker"
|
||||
systemctl restart docker 2>> /dev/null || echo "docker 重启失败"&&exit
|
||||
echo "换源成功"
|
||||
|
||||
|
@ -91,4 +91,4 @@ alias tool="$path/linuxtool/run.sh"
|
||||
echo "工具箱已经安装成功"
|
||||
echo "位置:${path}/linuxtool"
|
||||
echo "命令:tool"
|
||||
kill $PPID
|
||||
kill $PPID $> /dev/null
|
@ -19,4 +19,4 @@ fi
|
||||
|
||||
sed -i '/alias tool.*/d' "/etc/profile"
|
||||
echo "脚本已经卸载完整,公众号 lsy22 可以获取一键安装脚本"
|
||||
kill $PPID
|
||||
kill $PPID $> /dev/null
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user