mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			637 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			637 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh -e
 | |
| 
 | |
| case "$1" in
 | |
|     configure)
 | |
| 
 | |
|         if ! id cloud > /dev/null 2>&1 ; then
 | |
|             adduser --system --home /var/lib/cloud/management --no-create-home \
 | |
|                 --group --disabled-password --shell /bin/sh cloud
 | |
|                 # update me in cloud-client.postinst as well
 | |
|         fi
 | |
| 
 | |
| 	for i in /var/log/cloud/usage
 | |
| 	do
 | |
| 		chmod 0770 $i
 | |
| 		chgrp cloud $i
 | |
| 	done
 | |
| 	
 | |
| 	for i in /etc/cloud/usage/db.properties
 | |
| 	do
 | |
| 		chmod 0640 $i
 | |
| 		chgrp cloud $i
 | |
| 	done
 | |
| 	
 | |
| 	if [ "$2" = "" ] ; then # no recently configured version, this is a first install
 | |
| 		/usr/sbin/update-rc.d cloud-usage defaults || true
 | |
| 	fi
 | |
| 	
 | |
|     ;;
 | |
| esac
 | |
| 
 | |
| #DEBHELPER# |