This commit is contained in:
2023-04-16 21:38:32 +08:00
parent a0849e40ef
commit 0b6c876a0f
59 changed files with 1026 additions and 189 deletions

View File

@@ -43,7 +43,7 @@ function Usage {
function RestoreConf {
if [ -z "$(ls config/)" ]; then
Print Restore default config files and quit ...
Print Restoring default config files and quit ...
tar zxf config.tgz
exit
fi
@@ -52,7 +52,7 @@ function RestoreConf {
function ModifyConf {
local kv=
local conf='config/kibana.yml'
Print Modify $conf ...
Print Modifying $conf ...
while read kv; do
[ -z "$kv" ] && break
sed -i "/^${kv%%=*}: /d" $conf
@@ -62,24 +62,25 @@ function ModifyConf {
function InstallPlugin {
for f in $(ls -d offline-plugins/*.zip 2>/dev/null); do
Print Install plugins from offline file: $f ...
Print Installing plugins from offline file: $f ...
./bin/kibana-plugin install file://$f
mv $f $f.installed
done
}
function ChangeOwner {
Print Change file owner ...
chown -R kibana.kibana config/ data/ logs/ plugins/
Print Changing file owner ...
chown -R kibana:kibana config/ data/ logs/ plugins/
}
function StartProc {
Print Start kibana ...
Print Starting kibana ...
su - kibana -c "
export NODE_OPTIONS='${NODE_OPTIONS:-}'
/opt/kibana/bin/kibana
" &>> logs/kibana.out &
PIDS="$PIDS $!"
Print Kibana started.
}
function Main {