Last active
December 6, 2017 01:21
-
-
Save monaka/5cb1f33e5317e29285843f158a387c9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Copy CIFS mount | |
After=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
TimeoutStartSec=0 | |
ExecStartPre = -/usr/bin/mkdir -p /opt/sbin | |
ExecStart=/bin/sh -c "rm -fr /opt/sbin && rsync -a /usr/sbin/ /opt/sbin/ && /usr/bin/docker run --rm -v /opt/sbin:/target so0k/mount.cifs_copy /target && mount --bind /opt/sbin/ /usr/sbin/" | |
[Install] | |
WantedBy = multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why create
sbin/
in/opt/
if you're just going torm
it immediately? Just create/opt
instead to resolve the rsync issue.