Add user setup script
This commit is contained in:
@@ -57,10 +57,10 @@ in {
|
||||
};
|
||||
|
||||
setup = {
|
||||
trigger="server";
|
||||
trigger = "server";
|
||||
script = pkgs.writeShellScript "setup" ''
|
||||
# Define the command wrapper
|
||||
OCC="${pkgs.podman}/bin/podman --events-backend=none exec -u www-data nextcloud-server php occ"
|
||||
OCC="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."CUSTOM".path} -e DOMAIN=${serverCfg.hostDomain} -u www-data nextcloud-server php occ"
|
||||
|
||||
echo "Waiting for Nextcloud container to start..."
|
||||
until $OCC status > /dev/null 2>&1; do
|
||||
@@ -71,10 +71,11 @@ in {
|
||||
if [ -z "$INSTALLED" ]; then
|
||||
echo "Running first-time setup..."
|
||||
|
||||
# $OCC maintenance:install \
|
||||
# --admin-user "admin" \
|
||||
# --admin-pass "adminpassword"
|
||||
|
||||
$OCC maintenance:install \
|
||||
--admin-user "$DEFAULT_ADMIN_USERNAME" \
|
||||
--admin-pass "$DEFAULT_ADMIN_PASSWORD"
|
||||
fi
|
||||
if [ -z "$INSTALLED" ]; then
|
||||
echo "Applying Settings..."
|
||||
|
||||
$OCC config:system:set default_phone_region --value="CH"
|
||||
|
||||
Reference in New Issue
Block a user