doc: add install.sh method in readme

This commit is contained in:
fxiang21
2023-11-23 16:03:56 +08:00
parent 18ffeb681f
commit 8f0107b46c
3 changed files with 46 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
cmdb_dir="/home/$(whoami)/apps"
cmdb_dir="~/apps"
check_docker() {
if [ -x "$(command -v docker)" ]; then
@@ -129,6 +129,9 @@ uninstall_service() {
current_path=$(pwd)
cd ${cmdb_dir}/cmdb || exit 1
docker-compose down -v
if [ $? -eq 0 ];then
rm -fr ${cmdb_dir}/cmdb
fi
cd $current_path || exit 1
fi
}