summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-09-09 21:40:48 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-09-09 21:40:48 -0400
commitc78bbbf52ac01cbdeae95dbe0481cb32c837c724 (patch)
tree05d9721fee55d18119020a283fd1ac3253365503
parentc4449b15a5019f3fd46d4c942dbb00202000b15f (diff)
service-myhostname: Tidy up
-rw-r--r--config-parabola-service-myhostname.PKGBUILD34
1 files changed, 17 insertions, 17 deletions
diff --git a/config-parabola-service-myhostname.PKGBUILD b/config-parabola-service-myhostname.PKGBUILD
index 80d43d3..4ac76db 100644
--- a/config-parabola-service-myhostname.PKGBUILD
+++ b/config-parabola-service-myhostname.PKGBUILD
@@ -7,11 +7,11 @@ preamble
depends+=(config-parabola-mgmt-nginx)
-add-file etc/nginx/sites/server-myhostname.conf <<EOF
+add-file etc/nginx/sites/server-myhostname.conf <<'EOF'
# -*- Mode: nginx; nginx-indent-level: 8; indent-tabs-mode: t -*-
server {
- server_name \$hostname;
+ server_name $hostname;
listen 443 ssl http2;
listen [::]:443 ssl http2;
@@ -38,25 +38,25 @@ depends+=(
uwsgi-plugin-cgi
)
-add-file -m755 srv/http/myhostname/sysinfo <<EOF
+add-file -m755 srv/http/myhostname/sysinfo <<'EOF'
#!/bin/bash
# Copyright 2016 Luke Shumaker
cmds=(
'hostnamectl status'
- "systemctl status | sed '1d;/^\\s*CGroup:/,\\\$d'"
+ "systemctl status | sed '1d;/^\s*CGroup:/,\$d'"
'uptime'
'free -h'
- "df -Th | sed -n '1p;/^\\/dev/p'"
+ "df -Th | sed -n '1p;/^\/dev/p'"
)
-printf '%s\\r\\n' \\
- 'Content-Type: text/plain; charset=utf-8' \\
+printf '%s\r\n' \
+ 'Content-Type: text/plain; charset=utf-8' \
''
-for cmd in "\${cmds[@]}"; do
- printf '\$ %s\\n' "\$cmd"
- (eval "\$cmd")
+for cmd in "${cmds[@]}"; do
+ printf '$ %s\n' "$cmd"
+ (eval "$cmd")
echo
done
EOF
@@ -92,14 +92,14 @@ depends+=(
)
add-unit etc/systemd/system/multi-user.target.wants/collectd.service
-add-unit etc/systemd/system/sysinit.target.wants/systemd-time-wait-sync.service
-add-file -m644 etc/systemd/system/collectd.service.d/time-sync.conf <<EOF
-[Unit]
-# Because we write RRD files with timestamps in them, we need to have
-# a functional clock. Otherwise the RRD files will get garbled.
-After=time-sync.target
-EOF
+add-unit etc/systemd/system/sysinit.target.wants/systemd-time-wait-sync.service
+add-file -m644 etc/systemd/system/collectd.service.d/time-sync.conf <<-'EOF'
+ [Unit]
+ # Because we write RRD files with timestamps in them, we need to have
+ # a functional clock. Otherwise the RRD files will get garbled.
+ After=time-sync.target
+ EOF
postamble
}