Browse Source

add system upgrade function

master
filesite 5 months ago
parent
commit
4b71ba8d39
  1. 17
      install.sh
  2. 4
      template/custom_config_beauty.json
  3. 4
      template/custom_config_videoblog.json

17
install.sh

@ -22,9 +22,7 @@ theend () { @@ -22,9 +22,7 @@ theend () {
# 获取用户桌面绝对路径
getHomePath () {
cd ~/
path=`pwd`
cd -
path=`cd ~/ && pwd`
echo $path
}
@ -170,6 +168,15 @@ dockerStartVideoContainer () { @@ -170,6 +168,15 @@ dockerStartVideoContainer () {
videoblog
}
# 升级docker容器里的代码到最新版
upgradeMacheteInContainers () {
docker exec -it machete_album /var/www/machete/bin/upgrade.sh
docker container cp template/custom_config_beauty.json machete_album:/var/www/machete/runtime/custom_config.json
docker exec -it machete_vlog /var/www/machete/bin/upgrade.sh
docker container cp template/custom_config_videoblog.json machete_vlog:/var/www/machete/runtime/custom_config.json
}
# 检测域名是否能连接
# 返回值:0 - 不能连接,1 - 可连接
detectDomainCanConnect () {
@ -391,4 +398,8 @@ if [ $containerExist -eq 0 ]; then @@ -391,4 +398,8 @@ if [ $containerExist -eq 0 ]; then
echo "还可以在浏览器输入:http://${ip}:8182/ 打开"
fi
echo ""
echo "升级系统到最新版..."
upgradeMacheteInContainers
theend

4
template/custom_config_beauty.json

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"theme": "beauty",
"content_directory": "girls/"
}

4
template/custom_config_videoblog.json

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"theme": "videoblog",
"content_directory": "videos/"
}
Loading…
Cancel
Save