Skip to content

Commit 2bf39d0

Browse files
committed
Fix additional issue when restarting container
1 parent c869790 commit 2bf39d0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
### Fixed
9+
- Fixed additional error when container is restarted
10+
711
## [0.3.1] - 2020-10-27
812
### Fixed
913
- Fixed error when container is restarted instead of recreated

docker-entrypoint.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
username = sambaUsername,
6262
directory = shareDirectory
6363
))
64-
os.mkdir(shareDirectory)
64+
if not os.path.exists(shareDirectory):
65+
os.mkdir(shareDirectory)
6566
subprocess.call("chown {}:{} {}".format(linuxUserId, linuxGroupId, shareDirectory), shell=True)
6667
os.environ['SHARE{}'.format(i)] = "{};{};yes;no;no;{}".format(shareName, shareDirectory, sambaUsername)
6768

0 commit comments

Comments
 (0)