*(global): fixed service implementation for OpenWrt

We now use a procd init script for OpenWrt just like it's recommended in
the documentation. The service is automatically enabled on the install
command.

 Closes: https://github.com/AdguardTeam/AdGuardHome/issues/1386
This commit is contained in:
Andrey Meshkov
2020-02-05 17:38:23 +03:00
parent 54c285001d
commit fc88f59f61
3 changed files with 180 additions and 95 deletions

View File

@@ -152,15 +152,6 @@ type updateInfo struct {
newBinName string // Full path to the new executable file
}
// Return TRUE if file exists
func fileExists(fn string) bool {
_, err := os.Stat(fn)
if err != nil {
return false
}
return true
}
// Fill in updateInfo object
func getUpdateInfo(jsonData []byte) (*updateInfo, error) {
var u updateInfo