summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--qqbot.service2
-rw-r--r--v2.3.conf88
4 files changed, 98 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19d06640c0b3..249169922166 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -15,8 +15,10 @@ pkgbase = qqbot
optdepends = shotwell: Automatically pop up QR code image
source = https://github.com/pandolia/qqbot/archive/v2.3.10.tar.gz
source = qqbot.service
+ source = v2.3.conf
sha512sums = c72f8a1c153c97a50adfaeb7704cbdacebcdd01b4a603e1a34ab571447cf3a2747c4da6480f7ce070eccd2b7fe5e3306924a111be1f680947fab245ee266a813
- sha512sums = d1788e6ae6f9a044fabfe3923e14e2b9e007eac9abfbb53010b155e00cc225bedc339f38a124fa41cdf1b2041ea29c136596d39d9e45427c87a831afb6a93aa3
+ sha512sums = 9cf0eb4c82adff3ae4d793bedae13a6e83936b3aca8fc59b4f530b439c0913eaa375f07482cb1f58a9c10d7fd86ba1d1ab9304b4b89c87f637414bee1be9611e
+ sha512sums = b309138c46499b1877a7eb2d7e10b2a4a8fc3755bc9ed06b6ef954479ebef9a9c6d9a20d04e066dc1f28bac447d810087ea9db988179374abb0069bccebc587b
pkgname = qqbot
diff --git a/PKGBUILD b/PKGBUILD
index 888dea43fd2f..addf53e23b5e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,9 +12,11 @@ optdepends=("gvfs: Automatically pop up QR code image"
"python-wcwidth: For cmdQrcode"
"shotwell: Automatically pop up QR code image")
source=("https://github.com/pandolia/qqbot/archive/v$pkgver.tar.gz"
- "qqbot.service")
+ "qqbot.service"
+ "v2.3.conf")
sha512sums=("c72f8a1c153c97a50adfaeb7704cbdacebcdd01b4a603e1a34ab571447cf3a2747c4da6480f7ce070eccd2b7fe5e3306924a111be1f680947fab245ee266a813"
- "d1788e6ae6f9a044fabfe3923e14e2b9e007eac9abfbb53010b155e00cc225bedc339f38a124fa41cdf1b2041ea29c136596d39d9e45427c87a831afb6a93aa3")
+ "9cf0eb4c82adff3ae4d793bedae13a6e83936b3aca8fc59b4f530b439c0913eaa375f07482cb1f58a9c10d7fd86ba1d1ab9304b4b89c87f637414bee1be9611e"
+ "b309138c46499b1877a7eb2d7e10b2a4a8fc3755bc9ed06b6ef954479ebef9a9c6d9a20d04e066dc1f28bac447d810087ea9db988179374abb0069bccebc587b")
build() {
cd "$srcdir"/qqbot-$pkgver
@@ -25,5 +27,6 @@ package() {
cd qqbot-$pkgver
python setup.py install --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
- install -Dm644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
+ install -Dm644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname@.service
+ install -Dm644 "$srcdir"/v2.3.conf "$pkgdir"/etc/$pkgname/v2.3.conf
}
diff --git a/qqbot.service b/qqbot.service
index 5637dfea62f7..aef9b3eb403a 100644
--- a/qqbot.service
+++ b/qqbot.service
@@ -6,7 +6,7 @@ Wants=network.target
[Service]
Type=simple
PIDFile=/var/run/qqbot.pid
-ExecStart=/usr/bin/qqbot -b /etc/qqbot
+ExecStart=/usr/bin/qqbot -b /etc/qqbot -u %i
Restart=on-failure
[Install]
diff --git a/v2.3.conf b/v2.3.conf
new file mode 100644
index 000000000000..316f6322b221
--- /dev/null
+++ b/v2.3.conf
@@ -0,0 +1,88 @@
+{
+
+ # QQBot 的配置文件
+ # 使用 qqbot -u somebody 启动程序时,依次加载:
+ # 根配置 -> 默认配置 -> 用户 somebody 的配置 -> 命令行参数配置
+ # 使用 qqbot 启动程序时,依次加载:
+ # 根配置 -> 默认配置 -> 命令行参数配置
+
+ # 用户 somebody 的配置
+ "somebody" : {
+
+ # QQBot-term (HTTP-API) 服务器端口号(该服务器监听 IP 为 127.0.0.1 )
+ # 设置为 0 则不会开启本服务器(此时 qq 命令和 HTTP-API 接口都无法使用)。
+ "termServerPort" : 8188,
+
+ # 二维码 http 服务器 ip,请设置为公网 ip 或空字符串
+ "httpServerIP" : "",
+
+ # 二维码 http 服务器端口号
+ "httpServerPort" : 8189,
+
+ # 自动登录的 QQ 号
+ "qq" : "3497303033",
+
+ # 接收二维码图片的邮箱账号
+ "mailAccount" : "3497303033@qq.com",
+
+ # 该邮箱的 IMAP/SMTP 服务授权码
+ "mailAuthCode" : "feregfgftrasdsew",
+
+ # 是否以文本模式显示二维码
+ "cmdQrcode" : False,
+
+ # 显示/关闭调试信息
+ "debug" : False,
+
+ # QQBot 掉线后自动重启
+ "restartOnOffline" : False,
+
+ # 在后台运行 qqbot ( daemon 模式)
+ "daemon": False,
+
+ # 完成全部联系人列表获取之后才启动 QQBot
+ "startAfterFetch" : False,
+
+ # 插件目录
+ "pluginPath" : ".",
+
+ # 启动时需加载的插件
+ "plugins" : [],
+
+ # 插件的配置(由用户自定义)
+ "pluginsConf" : {},
+
+ },
+
+ # 可以在 默认配置 中配置所有用户都通用的设置
+ "默认配置" : {
+ "qq" : "",
+ "pluginPath" : "",
+ "plugins" : [
+ 'qqbot.plugins.sampleslots',
+ 'qqbot.plugins.schedrestart',
+ ],
+ "pluginsConf" : {
+ 'qqbot.plugins.schedrestart': '8:00',
+ }
+ },
+
+ # # 注意:根配置是固定的,用户无法修改(在本文件中修改根配置不会生效)
+ # "根配置" : {
+ # "termServerPort" : 8188,
+ # "httpServerIP" : "",
+ # "httpServerPort" : 8189,
+ # "qq" : "",
+ # "mailAccount" : "",
+ # "mailAuthCode" : "",
+ # "cmdQrcode" : False,
+ # "debug" : False,
+ # "restartOnOffline" : False,
+ # "daemon" : False,
+ # "startAfterFetch" : False,
+ # "pluginPath" : "",
+ # "plugins" : [],
+ # "pluginsConf" : {}
+ # },
+
+}