mirror of
				https://github.com/bashclub/zamba-lxc-toolbox.git
				synced 2025-11-04 08:02:28 +01:00 
			
		
		
		
	run semaphore as unpriv user
This commit is contained in:
		@@ -52,6 +52,9 @@ fi
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
chmod +x /usr/local/bin/update-semaphore
 | 
					chmod +x /usr/local/bin/update-semaphore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					useradd -m -r -s /bin/bash semaphore
 | 
				
			||||||
 | 
					sudo -s -u semaphore bash -c 'ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat << EOF > /etc/apt/apt.conf.d/80-semaphore-apt-hook
 | 
					cat << EOF > /etc/apt/apt.conf.d/80-semaphore-apt-hook
 | 
				
			||||||
DPkg::Post-Invoke {"/usr/local/bin/update-semaphore";};
 | 
					DPkg::Post-Invoke {"/usr/local/bin/update-semaphore";};
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
@@ -70,6 +73,8 @@ ExecReload=/bin/kill -HUP \$MAINPID
 | 
				
			|||||||
ExecStart=/usr/bin/semaphore service --config=/etc/semaphore/config.json
 | 
					ExecStart=/usr/bin/semaphore service --config=/etc/semaphore/config.json
 | 
				
			||||||
SyslogIdentifier=semaphore
 | 
					SyslogIdentifier=semaphore
 | 
				
			||||||
Restart=always
 | 
					Restart=always
 | 
				
			||||||
 | 
					User=semaphore
 | 
				
			||||||
 | 
					Group=semaphore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Install]
 | 
					[Install]
 | 
				
			||||||
WantedBy=multi-user.target
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user