mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 21:14:41 +00:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
438b8a1dd2 | ||
|
|
ca967ec59c | ||
|
|
2beb1c0d82 | ||
|
|
772c3e0bc0 | ||
|
|
bcda992322 | ||
|
|
87de9cec0a | ||
|
|
6d47d4ff18 | ||
|
|
4bb81e4669 | ||
|
|
c05d837350 | ||
|
|
8908c39969 | ||
|
|
df0f015944 | ||
|
|
46a37f0510 | ||
|
|
6ea3cdb364 | ||
|
|
be80d0cd95 | ||
|
|
296e88d099 | ||
|
|
b61a3db611 | ||
|
|
0f3d3e82f5 | ||
|
|
dd66f73157 | ||
|
|
cbbb907d6a | ||
|
|
ff6cdb6fda | ||
|
|
2eac040875 | ||
|
|
b41d855f73 | ||
|
|
182bc25343 | ||
|
|
12d5e5db03 | ||
|
|
455d226dcd | ||
|
|
f0448cd1b9 | ||
|
|
aff18fa091 | ||
|
|
80c347ac01 | ||
|
|
8113f51cf7 | ||
|
|
4f491fa22f | ||
|
|
3935489d8b | ||
|
|
d14381e6a2 | ||
|
|
42ebd5f325 | ||
|
|
a51bf70b79 | ||
|
|
3787c7bf99 | ||
|
|
ec7f6573ad | ||
|
|
50d68f3f76 | ||
|
|
d9c6a5c875 | ||
|
|
4bace9b16a | ||
|
|
84dfa7f5bf | ||
|
|
582f85c3ba | ||
|
|
7f4562629a | ||
|
|
4776b76b16 | ||
|
|
9f938f65b1 | ||
|
|
4ccae3f67f | ||
|
|
9f2e8dae6f |
2
.github/workflows/demo.yml
vendored
2
.github/workflows/demo.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get old instance and snapshot name, create new instance name
|
- name: Get old instance and snapshot name, create new instance name
|
||||||
run: |
|
run: |
|
||||||
echo "OLD_INSTANCE_SNAPSHOT_NAME=$(aws lightsail get-instance-snapshots | grep '"name": "casaos-0.3.6-1666150291' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
echo "OLD_INSTANCE_SNAPSHOT_NAME=$(aws lightsail get-instance-snapshots | grep '"name": "0.3.3-demo-1658402149' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
||||||
echo "OLD_INSTANCE_NAME=$(aws lightsail get-instances | grep '"name": "CasaOS-Demo-[0-9]' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
echo "OLD_INSTANCE_NAME=$(aws lightsail get-instances | grep '"name": "CasaOS-Demo-[0-9]' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
||||||
echo "NEW_INSTANCE_NAME=CasaOS-Demo-$(date +%s)" >> $GITHUB_ENV
|
echo "NEW_INSTANCE_NAME=CasaOS-Demo-$(date +%s)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|||||||
19
CHANGELOG.md
19
CHANGELOG.md
@@ -18,19 +18,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
## [0.3.7]
|
## [0.3.7.1] 2022-11-04
|
||||||
|
|
||||||
### Added
|
|
||||||
- [Storage] Disk merge (Beta), you can merge multiple disks into a single storage space (currently you need to enable this feature from the command line)
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- [Files] Changed the cache file storage location, now the file upload size is not limited by the system disk capacity.
|
|
||||||
- [Scripts] Updated installation and upgrade scripts to support more Debian-based Linux distributions.
|
|
||||||
- [Engineering] Refactored Local Storage into a standalone service as part of CasaOS modularization.
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [Apps] App list update mechanism improved, now you can see the latest apps in App Store immediately.
|
|
||||||
- [Storage] Fixed a lot of known issues
|
- Fix memory leak issue ([#658](https://github.com/IceWhaleTech/CasaOS/issues/658)[#646](https://github.com/IceWhaleTech/CasaOS/issues/646))
|
||||||
|
- Solve the problem of local application import failure ([#490](https://github.com/IceWhaleTech/CasaOS/issues/490))
|
||||||
|
|
||||||
|
## [0.3.7] 2022-10-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- [Storage] Disk merge (Beta), you can merge multiple disks into a single storage space (currently you need to enable this feature from the command line)
|
- [Storage] Disk merge (Beta), you can merge multiple disks into a single storage space (currently you need to enable this feature from the command line)
|
||||||
@@ -45,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- [Storage] Fixed a lot of known issues
|
- [Storage] Fixed a lot of known issues
|
||||||
|
|
||||||
|
|
||||||
## [0.3.6] - 2022-09-06
|
## [0.3.6-alpha.1] - 2022-09-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- [System] Added power and temperature info to performance widget (Intel)
|
- [System] Added power and temperature info to performance widget (Intel)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ SETUP_SCRIPT_FILEPATH="${SETUP_SCRIPT_DIRECTORY}/${SETUP_SCRIPT_FILENAME}"
|
|||||||
|
|
||||||
{
|
{
|
||||||
echo "🟩 Running ${SETUP_SCRIPT_FILENAME}..."
|
echo "🟩 Running ${SETUP_SCRIPT_FILENAME}..."
|
||||||
$BASH "${SETUP_SCRIPT_FILEPATH}" "${BUILD_PATH}"
|
$SHELL "${SETUP_SCRIPT_FILEPATH}" "${BUILD_PATH}"
|
||||||
} || {
|
} || {
|
||||||
echo "🟥 ${SETUP_SCRIPT_FILENAME} failed."
|
echo "🟥 ${SETUP_SCRIPT_FILENAME} failed."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
1
build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh
Normal file → Executable file
1
build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh
Normal file → Executable file
@@ -44,4 +44,3 @@ readonly SETUP_SCRIPT_FILEPATH="${SETUP_SCRIPT_DIRECTORY}/${SETUP_SCRIPT_FILENAM
|
|||||||
|
|
||||||
echo "🟩 Running ${SETUP_SCRIPT_FILENAME}..."
|
echo "🟩 Running ${SETUP_SCRIPT_FILENAME}..."
|
||||||
$SHELL "${SETUP_SCRIPT_FILEPATH}" "${BUILD_PATH}"
|
$SHELL "${SETUP_SCRIPT_FILEPATH}" "${BUILD_PATH}"
|
||||||
|
|
||||||
|
|||||||
@@ -74,3 +74,8 @@ type FileSetting struct {
|
|||||||
ShareDir []string `json:"share_dir" delim:"|"`
|
ShareDir []string `json:"share_dir" delim:"|"`
|
||||||
DownloadDir string `json:"download_dir"`
|
DownloadDir string `json:"download_dir"`
|
||||||
}
|
}
|
||||||
|
type BaseInfo struct {
|
||||||
|
Hash string `json:"i"`
|
||||||
|
Version string `json:"v"`
|
||||||
|
Channel string `json:"c,omitempty"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,21 +1,55 @@
|
|||||||
package route
|
package route
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/IceWhaleTech/CasaOS/model"
|
||||||
|
"github.com/IceWhaleTech/CasaOS/pkg/config"
|
||||||
"github.com/IceWhaleTech/CasaOS/pkg/samba"
|
"github.com/IceWhaleTech/CasaOS/pkg/samba"
|
||||||
|
"github.com/IceWhaleTech/CasaOS/pkg/utils/encryption"
|
||||||
"github.com/IceWhaleTech/CasaOS/pkg/utils/file"
|
"github.com/IceWhaleTech/CasaOS/pkg/utils/file"
|
||||||
"github.com/IceWhaleTech/CasaOS/pkg/utils/loger"
|
"github.com/IceWhaleTech/CasaOS/pkg/utils/loger"
|
||||||
"github.com/IceWhaleTech/CasaOS/service"
|
"github.com/IceWhaleTech/CasaOS/service"
|
||||||
|
"github.com/IceWhaleTech/CasaOS/types"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitFunction() {
|
func InitFunction() {
|
||||||
go InitNetworkMount()
|
go InitNetworkMount()
|
||||||
|
go InitInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func InitInfo() {
|
||||||
|
mb := model.BaseInfo{}
|
||||||
|
if file.Exists(config.AppInfo.DBPath + "/baseinfo.conf") {
|
||||||
|
err := json.Unmarshal(file.ReadFullFile(config.AppInfo.DBPath+"/baseinfo.conf"), &mb)
|
||||||
|
if err != nil {
|
||||||
|
loger.Error("baseinfo.conf", zap.String("error", err.Error()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if file.Exists("/etc/CHANNEL") {
|
||||||
|
channel := file.ReadFullFile("/etc/CHANNEL")
|
||||||
|
mb.Channel = string(channel)
|
||||||
|
}
|
||||||
|
mac, err := service.MyService.System().GetMacAddress()
|
||||||
|
if err != nil {
|
||||||
|
loger.Error("GetMacAddress", zap.String("error", err.Error()))
|
||||||
|
}
|
||||||
|
mb.Hash = encryption.GetMD5ByStr(mac)
|
||||||
|
mb.Version = types.CURRENTVERSION
|
||||||
|
os.Remove(config.AppInfo.DBPath + "/baseinfo.conf")
|
||||||
|
by, err := json.Marshal(mb)
|
||||||
|
if err != nil {
|
||||||
|
loger.Error("init info err", zap.Any("err", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file.WriteToFullPath(by, config.AppInfo.DBPath+"/baseinfo.conf", 0o666)
|
||||||
|
}
|
||||||
|
|
||||||
func InitNetworkMount() {
|
func InitNetworkMount() {
|
||||||
time.Sleep(time.Second * 10)
|
time.Sleep(time.Second * 10)
|
||||||
connections := service.MyService.Connections().GetConnectionsList()
|
connections := service.MyService.Connections().GetConnectionsList()
|
||||||
|
|||||||
@@ -560,6 +560,7 @@ func (ds *dockerService) DockerContainerCreate(m model.CustomizationPostData, id
|
|||||||
//container, err := cli.ContainerCreate(context.Background(), info.Config, info.HostConfig, &network.NetworkingConfig{info.NetworkSettings.Networks}, nil, info.Name)
|
//container, err := cli.ContainerCreate(context.Background(), info.Config, info.HostConfig, &network.NetworkingConfig{info.NetworkSettings.Networks}, nil, info.Name)
|
||||||
|
|
||||||
hostConfig.Mounts = volumes
|
hostConfig.Mounts = volumes
|
||||||
|
hostConfig.Binds = []string{}
|
||||||
hostConfig.Privileged = m.Privileged
|
hostConfig.Privileged = m.Privileged
|
||||||
hostConfig.CapAdd = m.CapAdd
|
hostConfig.CapAdd = m.CapAdd
|
||||||
hostConfig.NetworkMode = container.NetworkMode(m.NetworkModel)
|
hostConfig.NetworkMode = container.NetworkMode(m.NetworkModel)
|
||||||
|
|||||||
@@ -50,9 +50,18 @@ type SystemService interface {
|
|||||||
IsServiceRunning(name string) bool
|
IsServiceRunning(name string) bool
|
||||||
GetCPUTemperature() int
|
GetCPUTemperature() int
|
||||||
GetCPUPower() map[string]string
|
GetCPUPower() map[string]string
|
||||||
|
GetMacAddress() (string, error)
|
||||||
}
|
}
|
||||||
type systemService struct{}
|
type systemService struct{}
|
||||||
|
|
||||||
|
func (c *systemService) GetMacAddress() (string, error) {
|
||||||
|
interfaces, err := net.Interfaces()
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
inter := interfaces[0]
|
||||||
|
return inter.HardwareAddr, nil
|
||||||
|
}
|
||||||
func (c *systemService) MkdirAll(path string) (int, error) {
|
func (c *systemService) MkdirAll(path string) (int, error) {
|
||||||
_, err := os.Stat(path)
|
_, err := os.Stat(path)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
package types
|
package types
|
||||||
|
|
||||||
const CURRENTVERSION = "0.3.7"
|
const CURRENTVERSION = "0.3.7.1"
|
||||||
|
|
||||||
const BODY = " "
|
const BODY = " "
|
||||||
|
|||||||
Reference in New Issue
Block a user