Skip to content

Commit

Permalink
更改安装为初次启动
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoXianNv-boot committed Feb 15, 2024
1 parent 029709d commit 091683c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 18 deletions.
2 changes: 2 additions & 0 deletions jcm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->

- 添加时区参数

## 1.0.4

- 添加 docker 指令 终端组件可以使用
Expand Down
Empty file added jcm/rootfs/hassos
Empty file.
32 changes: 16 additions & 16 deletions jcm/rootfs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ export dir=https://github.com/XiaoXianNv-boot/jcm/releases/download/Preview
#export dir=http://192.168.2.2/data/jcm/pkg

cd /config/jcm/
mkdir -p jcm_install
cd jcm_install
mkdir -p Tools
cd Tools
curl -#fL -o install.py -C - $dir/install.py
cd ..
mkdir -p lib
cd lib
mkdir -p pkg
cd pkg
curl -#fL -o APP_V0.2.pkg -C - $dir/APP_V0.2.pkg
curl -#fL -o main_V0.2.pkg -C - $dir/main_V0.2.pkg
cd ..
cd ..
python3 /install.py
mkdir -p jcm_install
cd jcm_install
mkdir -p Tools
cd Tools
#curl -#fL -o install.py -C - $dir/install.py
cd ..
mkdir -p lib
cd lib
mkdir -p pkg
cd pkg
#curl -#fL -o APP_V0.2.pkg -C - $dir/APP_V0.2.pkg
#curl -#fL -o main_V0.2.pkg -C - $dir/main_V0.2.pkg
cd ..
cd ..
#python3 /install.py
mkdir -p /etc/services.d
mkdir -p /etc/services.d/jcm
chmod 777 /run.sh
chmod 777 /stop.sh
cp /stop.sh /config/jcm/main/stop.sh
#cp /stop.sh /config/jcm/main/stop.sh
ln -s /run.sh /etc/services.d/jcm/run
ln -s /config/jcm/main/stop.sh /etc/services.d/jcm/finish
27 changes: 25 additions & 2 deletions jcm/rootfs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ if [ -e /config/jcm/main/run.sh ]; then
bashio /config/jcm/main/run.sh
else
bashio::log.info install
cd / &&
tar xvf jcm.tar.gz
cd /config/jcm/
mkdir -p jcm_install
cd jcm_install
curl -#fL -o install.sh -C - https://github.com/XiaoXianNv-boot/jcm/raw/master/Tools/install.sh
bashio::log.info DOW EN
if [ -e install.sh ]; then
bashio::log.info run install bash
bash install.sh
bashio::log.info install ok
else
#Replace the source
bashio::log.info GitHub Down ERROR
curl -#fL -o install.sh -C - https://jiang144.i234.me/data/jcm/install/install.sh
bashio::log.info DOW EN
if [ -e install.sh ]; then
bashio::log.info run install bash
bash install.sh
bashio::log.info install ok
else
bashio::log.info GitHub Down ERROR
echo 网络错误,无法下载安装脚本,请检查网络
echo Network error, unable to download installation script, please check the network
exit 1
fi
fi
bashio /config/jcm/main/run.sh
fi

0 comments on commit 091683c

Please sign in to comment.