This commit is contained in:
cdle
2021-09-30 21:09:34 +08:00
parent 1a1d312efb
commit 038e78d48c
3 changed files with 20 additions and 3 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"time"
@@ -251,7 +250,7 @@ Alias=sillyGirl.service`
s.Reply(data)
return nil
}
os.WriteFile("/usr/lib/systemd/system/sillyGirl.service", []byte(service), 0o644)
WriteToFile("/usr/lib/systemd/system/sillyGirl.service", (service))
exec.Command("systemctl", "disable", string(sillyGirl)).Output()
exec.Command("systemctl", "enable", string(sillyGirl)).Output()
return "电脑重启后生效。"