diff --git a/plugins/samba/ico.png b/plugins/samba/ico.png new file mode 100644 index 000000000..3cb733af6 Binary files /dev/null and b/plugins/samba/ico.png differ diff --git a/plugins/samba/index.html b/plugins/samba/index.html new file mode 100755 index 000000000..a53f8768e --- /dev/null +++ b/plugins/samba/index.html @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/plugins/samba/index.py b/plugins/samba/index.py new file mode 100755 index 000000000..9780ba8c3 --- /dev/null +++ b/plugins/samba/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/samba/info.json b/plugins/samba/info.json new file mode 100755 index 000000000..f973f39da --- /dev/null +++ b/plugins/samba/info.json @@ -0,0 +1,15 @@ +{ + "id":3, + "title":"SMB", + "tip":"lib", + "name":"samba", + "type":"软件", + "ps":"samba文件共享管理", + "versions":"1.0", + "shell":"install.sh", + "checks":"server/samba", + "author":"midoks", + "home":"https://www.samba.org/", + "date":"2018-12-20", + "pid":"4" +} \ No newline at end of file diff --git a/plugins/samba/install.sh b/plugins/samba/install.sh new file mode 100755 index 000000000..15a0da24e --- /dev/null +++ b/plugins/samba/install.sh @@ -0,0 +1,35 @@ +#!/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_webssh() +{ + echo '正在安装脚本文件...' > $install_tmp + mkdir -p $serverPath/webssh + echo '1.0' > $serverPath/webssh/version.pl + echo '安装完成' > $install_tmp + +} + +Uninstall_webssh() +{ + rm -rf $serverPath/webssh + echo "卸载完成" > $install_tmp +} + +action=$1 +if [ "${1}" == 'install' ];then + Install_webssh +else + Uninstall_webssh +fi diff --git a/plugins/samba/js/samba.js b/plugins/samba/js/samba.js new file mode 100755 index 000000000..e69de29bb