Skip to content

Commit

Permalink
Change persistent folder name to docker_persistent
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoralves authored Mar 14, 2024
1 parent 18815ee commit a8928f8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions background_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ function finalize_install {
./compile_program.sh blank_program.st
cat > "$OPENPLC_DIR/start_openplc.sh" <<EOF
#!/bin/bash
if [ -d "/persistent" ]; then
mkdir -p /persistent/st_files
cp -n /workdir/webserver/dnp3_default.cfg /persistent/dnp3.cfg
cp -n /workdir/webserver/openplc_default.db /persistent/openplc.db
cp -n /workdir/webserver/st_files_default/* /persistent/st_files/
cp -n /dev/null /persistent/persistent.file
cp -n /dev/null /persistent/mbconfig.cfg
if [ -d "/docker_persistent" ]; then
mkdir -p /docker_persistent/st_files
cp -n /workdir/webserver/dnp3_default.cfg /docker_persistent/dnp3.cfg
cp -n /workdir/webserver/openplc_default.db /docker_persistent/openplc.db
cp -n /workdir/webserver/st_files_default/* /docker_persistent/st_files/
cp -n /dev/null /docker_persistent/persistent.file
cp -n /dev/null /docker_persistent/mbconfig.cfg
fi
cd "$OPENPLC_DIR/webserver"
"$OPENPLC_DIR/.venv/bin/python3" webserver.py
Expand Down Expand Up @@ -298,9 +298,9 @@ elif [ "$1" == "docker" ]; then
install_py_deps
install_all_libs
# Create persistent folder for docker
if [[ ! -d "/persistent" ]]
if [[ ! -d "/docker_persistent" ]]
then
mkdir /persistent
mkdir /docker_persistent
fi
finalize_install linux

Expand Down

0 comments on commit a8928f8

Please sign in to comment.