mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 02:26:00 +08:00
feat: add openim install scripts docs
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
@@ -115,7 +115,7 @@ LAST_OCTET=$((LAST_OCTET + 1))
|
||||
GRAFANA_NETWORK_ADDRESS=$(generate_ip)
|
||||
|
||||
###################### openim 配置 ######################
|
||||
# read: https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
# read: https://github.com/openimsdk/open-im-server/blob/main/deployment/README.md
|
||||
def "OPENIM_DATA_DIR" "/data/openim"
|
||||
def "OPENIM_INSTALL_DIR" "/opt/openim"
|
||||
def "OPENIM_CONFIG_DIR" "/etc/openim/config"
|
||||
|
||||
@@ -89,6 +89,10 @@ function openim::install::install_openim()
|
||||
${OPENIM_ROOT}/scripts/install/openim-rpc.sh openim::rpc::install || return 1
|
||||
${OPENIM_ROOT}/scripts/install/openim-api.sh openim::api::install || return 1
|
||||
|
||||
openim::common::sudo "cp -r ${OPENIM_ROOT}/deployments/templates/openim.target /etc/systemd/system/openim.target"
|
||||
openim::common::sudo "systemctl daemon-reload"
|
||||
openim::common::sudo "systemctl restart openim.target"
|
||||
openim::common::sudo "systemctl enable openim.target"
|
||||
openim::log::success "openim install success"
|
||||
}
|
||||
|
||||
@@ -103,6 +107,11 @@ function openim::uninstall::uninstall_openim()
|
||||
${OPENIM_ROOT}/scripts/install/openim-rpc.sh openim::rpc::uninstall || return 1
|
||||
${OPENIM_ROOT}/scripts/install/openim-api.sh openim::api::uninstall || return 1
|
||||
|
||||
set +o errexit
|
||||
openim::common::sudo "systemctl stop openim.target"
|
||||
openim::common::sudo "systemctl disable openim.target"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/openim.target"
|
||||
set -o errexit
|
||||
openim::log::success "openim uninstall success"
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
function openim::man::info() {
|
||||
cat <<- EOF
|
||||
Usage:
|
||||
man openim-server # Display the man page for openim-server
|
||||
man openim-server to see openim-server help # Display the man page for openim-server
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user