mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-16 05:45:25 +00:00
🚑 Fix docker make data folder
This commit is contained in:
parent
81f895ecce
commit
8fb39b1e2e
@ -1,10 +1,13 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
data = Path("data")
|
||||||
|
data.mkdir(exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def rename(old: Path):
|
def rename(old: Path):
|
||||||
if old.exists():
|
if old.exists():
|
||||||
old_file_name = old.name
|
old_file_name = old.name
|
||||||
new = Path("data") / old_file_name
|
new = data / old_file_name
|
||||||
if new.exists():
|
if new.exists():
|
||||||
new.unlink()
|
new.unlink()
|
||||||
old.rename(new)
|
old.rename(new)
|
||||||
|
@ -57,6 +57,7 @@ login () {
|
|||||||
|
|
||||||
main () {
|
main () {
|
||||||
cd /pagermaid/workdir || exit
|
cd /pagermaid/workdir || exit
|
||||||
|
mkdir -p /pagermaid/workdir/data
|
||||||
if [ -f "/pagermaid/workdir/install.lock" ]; then
|
if [ -f "/pagermaid/workdir/install.lock" ]; then
|
||||||
echo "Hello world!" > /pagermaid/workdir/data/install.lock
|
echo "Hello world!" > /pagermaid/workdir/data/install.lock
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user