in PATH we trust
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								94cdf36439
							
						
					
				
			
			
				commit
				
					
						2cf67e321e
					
				
			
		
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -29,10 +29,10 @@ if [ "$state_should" != "$state_is" ]; then
 | 
				
			||||||
         if [ -f "$__object/parameter/owner" ]; then
 | 
					         if [ -f "$__object/parameter/owner" ]; then
 | 
				
			||||||
            owner="-O '$(cat "$__object/parameter/owner")'"
 | 
					            owner="-O '$(cat "$__object/parameter/owner")'"
 | 
				
			||||||
         fi
 | 
					         fi
 | 
				
			||||||
         echo "su - postgres -c \"/usr/bin/createdb $owner '$name'\""
 | 
					         echo "su - postgres -c \"createdb $owner '$name'\""
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
      absent)
 | 
					      absent)
 | 
				
			||||||
         echo "su - postgres -c \"/usr/bin/dropdb '$name'\""
 | 
					         echo "su - postgres -c \"dropdb '$name'\""
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
   esac
 | 
					   esac
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,10 +45,10 @@ if [ "$state_is" != "$state_should" ]; then
 | 
				
			||||||
         [ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT"
 | 
					         [ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
         cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit"
 | 
					         cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit"
 | 
				
			||||||
         echo "su - postgres -c \"/usr/bin/psql -c \\\"$cmd\\\"\""
 | 
					         echo "su - postgres -c \"psql -c \\\"$cmd\\\"\""
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
      absent)
 | 
					      absent)
 | 
				
			||||||
         echo "su - postgres -c \"/usr/bin/dropuser \\\"$name\\\"\""
 | 
					         echo "su - postgres -c \"dropuser \\\"$name\\\"\""
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
   esac
 | 
					   esac
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue