|  | @@ -224,8 +224,10 @@ function remove_scuttlebot {
 | 
	
		
			
			| 224 | 224 |  function git_ssb_script {
 | 
	
		
			
			| 225 | 225 |      if [[ "$1" == "mesh" ]]; then
 | 
	
		
			
			| 226 | 226 |          git_ssb_script_name=$rootdir/usr/bin/git-ssb-create
 | 
	
		
			
			|  | 227 | +        git_ssb_daemon_filename=$rootdir/etc/systemd/system/git_ssb.service
 | 
	
		
			
			| 227 | 228 |      else
 | 
	
		
			
			| 228 | 229 |          git_ssb_script_name=/usr/bin/git-ssb-create
 | 
	
		
			
			|  | 230 | +        git_ssb_daemon_filename=/etc/systemd/system/git_ssb.service
 | 
	
		
			
			| 229 | 231 |      fi
 | 
	
		
			
			| 230 | 232 |      echo '#!/bin/bash' > $git_ssb_script_name
 | 
	
		
			
			| 231 | 233 |      echo 'reponame="$1"' >> $git_ssb_script_name
 | 
	
	
		
			
			|  | @@ -239,6 +241,24 @@ function git_ssb_script {
 | 
	
		
			
			| 239 | 241 |      echo 'fi' >> $git_ssb_script_name
 | 
	
		
			
			| 240 | 242 |      echo 'exit 0' >> $git_ssb_script_name
 | 
	
		
			
			| 241 | 243 |      chmod +x $git_ssb_script_name
 | 
	
		
			
			|  | 244 | +
 | 
	
		
			
			|  | 245 | +    echo '[Unit]' > $git_ssb_daemon_filename
 | 
	
		
			
			|  | 246 | +    echo 'Description=Git SSB (SSB git web interface)' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 247 | +    echo 'After=syslog.target' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 248 | +    echo 'After=network.target' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 249 | +    echo 'After=scuttlebot.target' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 250 | +    echo '' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 251 | +    echo '[Service]' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 252 | +    echo 'Type=simple' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 253 | +    echo 'User=scuttlebot' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 254 | +    echo 'Group=scuttlebot' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 255 | +    echo "WorkingDirectory=/etc/scuttlebot" >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 256 | +    echo "ExecStart=/usr/bin/git ssb web --public localhost:$GIT_SSB_PORT" >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 257 | +    echo 'Restart=always' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 258 | +    echo 'Environment="USER=scuttlebot"' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 259 | +    echo '' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 260 | +    echo '[Install]' >> $git_ssb_daemon_filename
 | 
	
		
			
			|  | 261 | +    echo 'WantedBy=multi-user.target' >> $git_ssb_daemon_filename
 | 
	
		
			
			| 242 | 262 |  }
 | 
	
		
			
			| 243 | 263 |  
 | 
	
		
			
			| 244 | 264 |  function scuttlebot_git_setup {
 |