Skip to content

Instantly share code, notes, and snippets.

@shanoor
Forked from monaka/cifs-mount-copy.service
Last active September 5, 2016 07:37
Show Gist options
  • Save shanoor/57ef106584643558b8ca5f49f7017cc1 to your computer and use it in GitHub Desktop.
Save shanoor/57ef106584643558b8ca5f49f7017cc1 to your computer and use it in GitHub Desktop.
[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 -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