File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -128,37 +128,6 @@ func Install() {
128
128
}
129
129
}
130
130
131
- srcFile , getErr = os .Open ("./conf/server.json" )
132
- if getErr != nil {
133
- fmt .Println (getErr )
134
- return
135
- }
136
- getErr = os .MkdirAll (ConfPath , 0755 )
137
- if getErr != nil {
138
- fmt .Println (getErr )
139
- }
140
- dstFile , getErr = os .OpenFile (ConfPath + "server.json" , os .O_CREATE | os .O_RDWR | os .O_TRUNC , 0644 )
141
- if getErr != nil {
142
- fmt .Println (getErr )
143
- return
144
- }
145
- for {
146
- n , getErr := srcFile .Read (buf )
147
- if getErr != nil {
148
- if getErr == io .EOF {
149
- break
150
- } else {
151
- fmt .Println (getErr )
152
- return
153
- }
154
- }
155
- n , getErr = dstFile .Write (buf [:n ])
156
- if getErr != nil {
157
- fmt .Println (getErr )
158
- return
159
- }
160
- }
161
-
162
131
// 注册系统服务
163
132
getErr = ioutil .WriteFile ("/etc/systemd/system/ddns-server.service" , serviceContent , 0664 )
164
133
if getErr != nil {
You can’t perform that action at this time.
0 commit comments