#!/bin/sh # Alpine Linux HOMER setup echo read -p "Did you customize /etc/homer/webapp_config.json before running this setup (y/n)? " answer test "$answer" = "y" || exit 1 # Create user /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -create-homer-user \ -database-root=postgres \ -database-root-user=postgres \ -database-host=localhost # Create config and data DBs /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -create-config-db \ -database-root=postgres \ -database-root-user=postgres \ -database-host=localhost \ -database-homer-user=homer_user /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -create-data-db \ -database-root=postgres \ -database-root-user=postgres \ -database-host=localhost \ -database-root-password=postgres \ -database-homer-user=homer_user # Create role /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -create-homer-role \ -database-root=postgres \ -database-root-user=postgres \ -database-host=localhost \ -database-root-password=postgres \ -database-homer-data=homer_data \ -database-homer-config=homer_config # Populate connection data from webapp_config /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -create-table-db-config # Populate DB /usr/bin/homer-app \ -webapp-config-path=/etc/homer \ -populate-table-db-config