15 lines
		
	
	
	
		
			669 B
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			669 B
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
[Unit]
 | 
						|
Description=share home folders via virtiofsd
 | 
						|
## $I is split into two parameters: VM:USER
 | 
						|
 | 
						|
[Service]
 | 
						|
Type=exec
 | 
						|
ExecStartPre=/usr/bin/mkdir -p /run/virtiofs/
 | 
						|
ExecStart=/usr/bin/sh -c 'v="%i"; soc="$${v%%:*}"; usr="$${v##*:}"; exec /usr/local/bin/virtiofsd --announce-submounts --socket-path="/run/virtiofs/$${soc}.sock" --shared-dir "/lmn/media/$${usr}"'
 | 
						|
ExecStartPost=/usr/bin/chmod 755 /run/virtiofs/
 | 
						|
ExecStartPost=/usr/bin/sh -c 'v="%i"; soc="$${v%%:*}"; usr="$${v##*:}"; chown "$$usr" "/run/virtiofs/$${soc}.sock"'
 | 
						|
ExecStopPost=/usr/bin/sh -c 'v="%i"; soc="$${v%%:*}"; rm "/run/virtiofs/$${soc}.sock"'
 | 
						|
SuccessExitStatus=1
 | 
						|
 | 
						|
[Install]
 | 
						|
WantedBy=multi-user.target
 |