mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 04:54:41 +00:00
Compare commits
3 Commits
v0.4.0-alp
...
v0.4.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
062d95c1eb | ||
|
|
75643287a5 | ||
|
|
6bda9406fb |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -16,8 +16,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Security
|
||||
|
||||
## [0.4.0 - alpha]
|
||||
### Added
|
||||
|
||||
- [Developer] Included `casaos-cli` command tool for debugging
|
||||
- [Developer] Added message bus for events and actions - Use `casaos-cli message-bus` to manage.
|
||||
- [Disk] Disk notification in Dashboard
|
||||
- [System] Restart/shutdown directly from CasaOS Dashboard
|
||||
### Changed
|
||||
|
||||
- [General] CasaOS new logo!
|
||||
- [App] Redesign of Featured App
|
||||
- [App] Now you can choose to delete userdata along with app uninstallation
|
||||
|
||||
### Security
|
||||
|
||||
- [System] Fixed a shell injection issue for better security
|
||||
|
||||
### Fixed
|
||||
|
||||
- [System] Re-instate default zone0 for CPU Temp ([#694](https://github.com/IceWhaleTech/CasaOS/issues/694))
|
||||
- [Disk] Fixed storage name with extra `-1` after rebooting ([#698](https://github.com/IceWhaleTech/CasaOS/issues/698))
|
||||
- [Disk] Fixed disk check so it does not impact disk going into idle ([#704](https://github.com/IceWhaleTech/CasaOS/issues/704))
|
||||
|
||||
## [0.3.8] 2022-11-21
|
||||
|
||||
|
||||
@@ -337,17 +337,12 @@ func GetSystemProxy(c *gin.Context) {
|
||||
func PutSystemState(c *gin.Context) {
|
||||
state := c.Param("state")
|
||||
if state == "off" {
|
||||
go func() {
|
||||
time.Sleep(30 * time.Second)
|
||||
service.MyService.System().SystemShutdown()
|
||||
}()
|
||||
service.MyService.System().SystemShutdown()
|
||||
} else if state == "restart" {
|
||||
go func() {
|
||||
time.Sleep(30 * time.Second)
|
||||
service.MyService.System().SystemReboot()
|
||||
}()
|
||||
service.MyService.System().SystemReboot()
|
||||
|
||||
}
|
||||
c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: "The operation will be executed after 30 seconds"})
|
||||
c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: "The operation will be completed shortly."})
|
||||
}
|
||||
|
||||
// @Summary 获取一个可用端口
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
net2 "net"
|
||||
@@ -63,8 +64,15 @@ func (c *systemService) GetMacAddress() (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
inter := interfaces[0]
|
||||
return inter.HardwareAddr, nil
|
||||
nets := MyService.System().GetNet(true)
|
||||
for _, v := range interfaces {
|
||||
for _, n := range nets {
|
||||
if v.Name == n {
|
||||
return v.HardwareAddr, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", errors.New("not found")
|
||||
}
|
||||
|
||||
func (c *systemService) MkdirAll(path string) (int, error) {
|
||||
|
||||
Reference in New Issue
Block a user