feat: fnos-resmon v1.2.0 资源监视器
This commit is contained in:
commit
68e2960046
25 files changed
+311
No files matched your search
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user change environment variables in application setting page.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user change environment variables in application setting page.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user installs the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user installs the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE_PATH="${TRIM_APPDEST}/docker/docker-compose.yaml"
|
||||
|
||||
is_docker_running () {
|
||||
DOCKER_NAME=""
|
||||
|
||||
if [ -f "$FILE_PATH" ]; then
|
||||
DOCKER_NAME=$(cat $FILE_PATH | grep "container_name" | awk -F ':' '{print $2}' | xargs)
|
||||
echo "DOCKER_NAME is set to: $DOCKER_NAME"
|
||||
fi
|
||||
|
||||
if [ -n "$DOCKER_NAME" ]; then
|
||||
docker inspect $DOCKER_NAME | grep -q "\"Status\": \"running\"," || exit 1
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
# run start command. exit 0 if success, exit 1 if failed
|
||||
# do nothing, docker application will be started by appcenter
|
||||
exit 0
|
||||
;;
|
||||
stop)
|
||||
# run stop command. exit 0 if success, exit 1 if failed
|
||||
# do nothing, docker application will be stopped by appcenter
|
||||
exit 0
|
||||
;;
|
||||
status)
|
||||
# check application status command. exit 0 if running, exit 3 if not running
|
||||
# check first container by default, you cound modify it by yourself
|
||||
if is_docker_running; then
|
||||
exit 0
|
||||
else
|
||||
exit 3
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user uninstalls the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user uninstalls the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user upgrades the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user upgrades the application.
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user