umorpha-boxes/modules/service-umorpha-apex.sh

22 lines
646 B
Bash

#!/hint/bash -euE
# Copyright (C) 2024 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
load_module "$(dirname -- "${BASH_SOURCE[0]}")/base-nginx.sh"
post_install+=(20:umorpha-apex:post_install)
umorpha-apex:post_install() {
local arg_mountpoint=$1
install -Dm644 /dev/stdin "$arg_mountpoint/etc/nginx/sites/umorpha_apex.conf" <<-'EOF'
# -*- mode: nginx; nginx-indent-level: 4; intent-tabs-mode: nil -*-
server {
server_name umorpha.io;
include /etc/nginx/snippets/listen.conf;
error_log /var/log/nginx/main-error.http.umorpha_io.log error;
return 301 https://www.umorpha.io$request_uri;
}
EOF
}