Skip to content

Commit

Permalink
修复小bug
Browse files Browse the repository at this point in the history
  • Loading branch information
firemakergk committed Feb 21, 2023
1 parent 9f7a6c1 commit 029c6c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion details/设置docker-compose等待nfs挂载后再启动.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ OOMScoreAdjust=-500

[Install]
WantedBy=multi-user.target
```
```
5.执行`systemctl daemon-reload`重载系统服务。

6.执行`systemctl enable trunas-scan.service`将脚本设置为开机启动。

7.执行`systemctl status trunas-scan.service`查看服务在loaded那一行是否为enabled。如果是,则代表脚本正常部署了。
6 changes: 3 additions & 3 deletions files/setup_aquar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ echo '********安装&挂载NFS********'
apt install nfs-common -y
mkdir -p /opt/aquar/storages/aquarpool/
echo 'mount nfs'
mount -t nfs $nfspath:/mnt/aquar_pool /opt/aquar/storages/aquarpool/
mount -t nfs $nfspath:/mnt/aquarpool /opt/aquar/storages/aquarpool/
if ! grep -q '##\[aquar config start\]##' /etc/fstab;
then
cat >> /etc/fstab <<EOF
##[aquar config start]##
$nfspath:/mnt/aquar_pool /opt/aquar/storages/aquarpool nfs defaults,_netdev 0 0
$nfspath:/mnt/aquarpool /opt/aquar/storages/aquarpool nfs defaults,_netdev 0 0
##[aquar config end]##
EOF
else
Expand Down Expand Up @@ -191,7 +191,7 @@ services:
# Permanent storage for settings, index & sidecar files (DON'T REMOVE):
- "/opt/aquar/storages/apps/photoprism/storage:/photoprism/storage"
mariadb:
image: mariadb:10.4
image: mariadb:10.9.5
volumes:
- /opt/aquar/storages/apps/mariadb:/var/lib/mysql
- /opt/aquar/src/docker-compose/mariadb.init.d:/docker-entrypoint-initdb.d
Expand Down
2 changes: 1 addition & 1 deletion files/truenasseeker.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def updatefstab(nfsAdress):
configText = fstabFile.read()
prepart = re.split("##\[aquar config start\]##", configText)[0]
postpart = re.split("##\[aquar config end\]##", configText)[1]
nfsConfig = "\n##[aquar config start]##\n %s:/mnt/aquarpool /opt/aquar/storages/aquarpool nfs defaults,_netdev 0 0\n##[aquar config end]##\n" % nfsAdress
nfsConfig = "\n##[aquar config start]##\n %s:/mnt/aquar_pool /opt/aquar/storages/aquarpool nfs defaults,_netdev 0 0\n##[aquar config end]##\n" % nfsAdress
logger.info("new nfs config:")
logger.info(nfsConfig)
newConifg = prepart + nfsConfig+ postpart
Expand Down

0 comments on commit 029c6c3

Please sign in to comment.