mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改版本更新执行命令
This commit is contained in:
parent
ec0deeff06
commit
a652e1e190
|
@ -411,7 +411,7 @@ export default class UserService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateSystem() {
|
public async updateSystem() {
|
||||||
const cp = spawn('ql update', { shell: '/bin/bash' });
|
const cp = spawn('ql -l update', { shell: '/bin/bash' });
|
||||||
|
|
||||||
cp.stdout.on('data', (data) => {
|
cp.stdout.on('data', (data) => {
|
||||||
this.sockService.sendMessage(data.toString());
|
this.sockService.sendMessage(data.toString());
|
||||||
|
|
|
@ -127,12 +127,12 @@ export default function (props: any) {
|
||||||
ws.current = new SockJS(
|
ws.current = new SockJS(
|
||||||
`${location.origin}/api/ws?token=${localStorage.getItem(config.authKey)}`,
|
`${location.origin}/api/ws?token=${localStorage.getItem(config.authKey)}`,
|
||||||
);
|
);
|
||||||
ws.current.onopen = (e) => {
|
ws.current.onopen = (e: any) => {
|
||||||
console.log('ws opened', e);
|
console.log('websocket连接成功', e);
|
||||||
};
|
};
|
||||||
|
|
||||||
ws.current.onclose = (e) => {
|
ws.current.onclose = (e: any) => {
|
||||||
console.log('ws closed', e);
|
console.log('websocket已关闭', e);
|
||||||
};
|
};
|
||||||
const wsCurrent = ws.current;
|
const wsCurrent = ws.current;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user