Allow container to reboot properly if using /tmp/ for models. Fixes newly created folder having permissions issues.
This commit is contained in:
23
Config/LibreTranslate/cron-reboot.sh
Executable file
23
Config/LibreTranslate/cron-reboot.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# 2025-07-26 Hyperling
|
||||
# Ensure the LibreTranslate container starts correctly after a reboot, especially if placing models/ under /tmp/.
|
||||
|
||||
## Setup ##
|
||||
|
||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
cd $DIR
|
||||
source .env
|
||||
|
||||
## Main ##
|
||||
|
||||
# Shutdown the container.
|
||||
docker compose down
|
||||
|
||||
# Create folders.
|
||||
prep.sh
|
||||
|
||||
# Start the container.
|
||||
docker compose up -d
|
||||
|
||||
# Finish successfully.
|
||||
exit 0
|
Reference in New Issue
Block a user