Skip to content

Instantly share code, notes, and snippets.

@edevil
Forked from monaka/cifs-mount-copy.service
Created July 11, 2016 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edevil/e85b53359c2b88959a9fd28fe0c19fac to your computer and use it in GitHub Desktop.
Save edevil/e85b53359c2b88959a9fd28fe0c19fac to your computer and use it in GitHub Desktop.
[Unit]
Description=Copy CIFS mount
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStartSec=0
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