Skip to content

Commit

Permalink
added check and automatic creation of /persistent directory during st…
Browse files Browse the repository at this point in the history
…artup of OpenPlc

This allows to startup in the same way inside and outside of Docker environment.
In docker container it is mount point for volume.
Outside docker, ie. normal linux it will persist all data in /persistent directory
  • Loading branch information
Wawszczak committed Feb 10, 2023
1 parent 4fb51f9 commit e15cde4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webserver/scripts/start_openplc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
if [[ ! -d "/persistent" ]]
then
mkdir /persistent
fi
if [[ ! -f "/persistent/dnp3.cfg" ]]
then
cp /workdir/webserver/dnp3_default.cfg /persistent/dnp3.cfg
Expand Down

0 comments on commit e15cde4

Please sign in to comment.