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