diff --git a/plugins/gae/ico.png b/plugins/gae/ico.png new file mode 100644 index 000000000..3632800b0 Binary files /dev/null and b/plugins/gae/ico.png differ diff --git a/plugins/gae/index.html b/plugins/gae/index.html new file mode 100755 index 000000000..c044dfef9 --- /dev/null +++ b/plugins/gae/index.html @@ -0,0 +1,21 @@ +
+
+
+

插件说明

+
+ +
+
+
+
+
+ +
+ \ No newline at end of file diff --git a/plugins/gae/index.py b/plugins/gae/index.py new file mode 100755 index 000000000..9780ba8c3 --- /dev/null +++ b/plugins/gae/index.py @@ -0,0 +1,20 @@ +# coding: utf-8 + +import time +import random +import os +import json +import re +import sys + +sys.path.append(os.getcwd() + "/class/core") +import public + + +def status(): + return 'start' + +if __name__ == "__main__": + func = sys.argv[1] + if func == 'status': + print status() diff --git a/plugins/gae/info.json b/plugins/gae/info.json new file mode 100755 index 000000000..2bfa6eff6 --- /dev/null +++ b/plugins/gae/info.json @@ -0,0 +1,14 @@ +{ + "title":"GAE", + "tip":"soft", + "name":"gae", + "ps":"GAE 英文全称为 Google App Engine。它是 Google 管理的数据中心中用于 WEB 应用程序的开发和托管的平台", + "versions": "0.1", + "shell":"install.sh", + "checks":"server/gae", + "path":"server/gae", + "author":"mdserver-web", + "home":"https://github.com/midoks/mdserver-web", + "date":"2018-11-30", + "pid":"5" +} \ No newline at end of file diff --git a/plugins/gae/install.sh b/plugins/gae/install.sh new file mode 100755 index 000000000..7295872f4 --- /dev/null +++ b/plugins/gae/install.sh @@ -0,0 +1,46 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/bt_install.pl + +Install_gae() +{ + mkdir -p ${serverPath}/gae + mkdir -p ${serverPath}/source/gae + + os=`uname` + if [ "Darwin" == "$os" ];then + file=google-cloud-sdk-218.0.0-darwin-x86_64.tar.gz + else + file=google-cloud-sdk-218.0.0-linux-x86_64.tar.gz + fi + + if [ ! -f $serverPath/source/gae/$file ];then + wget -O $serverPath/source/gae/$file https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$file + fi + + cd $serverPath/source/gae && tar zxvf $file + + + echo "${1}" > ${serverPath}/gae/version.pl + echo '安装完成' > $install_tmp +} + +Uninstall_gae() +{ + rm -rf ${serverPath}/gae + echo '卸载完成' > $install_tmp +} + +action=$1 +if [ "${1}" == 'install' ];then + Install_gae $2 +else + Uninstall_gae $2 +fi