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

22 lines
646 B
Bash
Raw Permalink Normal View History

2024-02-12 19:39:33 +00:00
#!/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
2024-02-12 22:01:23 +00:00
install -Dm644 /dev/stdin "$arg_mountpoint/etc/nginx/sites/umorpha_apex.conf" <<-'EOF'
2024-02-12 19:39:33 +00:00
# -*- 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
}