网友 imes 说:
*帖最后由 imes 于 2022-6-13 11:56 编辑
已经修复,等后续更新即可,已奖励宝塔币300,这三百个宝塔币不知道能干什么,有一半得归功于@fly*ie 不知道能不能分出去
附赠一个宝塔的邮件**程序,自带的mail**很烦人,用golang重写了命令,解压后chmod +x mail **放到/usr/bin/里,任意目录执行mail命令就能查看
算了,loc不能上传程序,就放源码吧
package main
import (
&*uot;bytes&*uot;
&*uot;fmt&*uot;
&*uot;os/exec&*uot;
)
//function to execute linux shell command
func execCommand(command st**ng) (st**ng, er**r) {
cmd := exec.Command(&*uot;/bin/sh&*uot;, &*uot;-c&*uot;, command)
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
ret**n out.St**ng(), err
}
// main function
func main() {
// output notice to user to chose command
// if input is &*uot;check&*uot; then execute check command &*uot;cat /var/spool/mail/**ot&*uot;
// elif input is &*uot;clean&*uot; then execute clean command &*uot;cat /dev/null > /var/spool/mail/**ot&*uot;
// else exit
p**ntln(&*uot;Please input command: check or clean&*uot;)
var command st**ng
_, err := fmt.Scanln(&command)
if err != nil {
p**ntln(&*uot;Er**r: &*uot; + err.Er**r())
ret**n
}
if command == &*uot;check&*uot; {
p**ntln(&*uot;Execute command: cat /var/spool/mail/**ot&*uot;)
out, err := execCommand(&*uot;cat /var/spool/mail/**ot&*uot;)
if err != nil {
p**ntln(&*uot;Er**r: &*uot; + err.Er**r())
ret**n
}
p**ntln(out)
}
if command == &*uot;clean&*uot; {
p**ntln(&*uot;Execute command: cat /dev/null > /var/spool/mail/**ot&*uot;)
out, err := execCommand(&*uot;cat /dev/null > /var/spool/mail/**ot&*uot;)
if err != nil {
p**ntln(&*uot;Er**r: &*uot; + err.Er**r())
ret**n
}
p**ntln(out)
}
if command != &*uot;check&*uot; && command != &*uot;clean&*uot; {
p**ntln(&*uot;Er**r: Invalid command&*uot;)
ret**n
}
}
网友 米老鼠 说:
这理由不错的
网友 thaizxj 说:
下个版*应该会修复能用第三方云平台的bug吧
网友 imes 说:
thaizxj 发表于 2022-6-13 11:33
下个版*应该会修复能用第三方云平台的bug吧
网友 kill 说:
好的,已卸载
网友 海的尽头 说:
现在没人关心了,都想尽快逃离
网友 imes 说:
海的尽头 发表于 2022-6-13 11:40
现在没人关心了,都想尽快逃离
网友 zxxx 说:
imes 发表于 2022-6-13 11:41
我在等AMH的新版*
网友 laianguo 说:
攒了两千多宝塔币 换了一个充电头。。不知道发货没有。,
网友 etc小号 说:
https://www.**.cn/integral
300宝塔币居然价值9天的企业版
网友 气味 说:
……看不懂