home
·
contact
·
privacy
projects
/
config
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0990040
)
WIP.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 23 Nov 2018 01:25:38 +0000
(
02:25
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 23 Nov 2018 01:25:38 +0000
(
02:25
+0100)
all_new_2018/apt-mark/server
patch
|
blob
|
history
all_new_2018/install_for_target.sh
patch
|
blob
|
history
all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4
patch
|
blob
|
history
all_new_2018/setup_server.sh
patch
|
blob
|
history
diff --git
a/all_new_2018/apt-mark/server
b/all_new_2018/apt-mark/server
index 8d332e022d18ba108eb130137ef38faf2ac94d2e..842167542529e4e354d3b9395de253746a8c60ed 100644
(file)
--- a/
all_new_2018/apt-mark/server
+++ b/
all_new_2018/apt-mark/server
@@
-5,4
+5,4
@@
readline-common
# provides letsencrypt
certbot
# provides systemd scripts that configure iptables via /etc/iptables/*
# provides letsencrypt
certbot
# provides systemd scripts that configure iptables via /etc/iptables/*
-iptables-persistent
\ No newline at end of file
+iptables-persistent
diff --git
a/all_new_2018/install_for_target.sh
b/all_new_2018/install_for_target.sh
index 7693a0530174eb1aaa148e205d52e923a49aa097..9d765aa97d6662e733262d33ed08e54e6a3e14a6 100755
(executable)
--- a/
all_new_2018/install_for_target.sh
+++ b/
all_new_2018/install_for_target.sh
@@
-1,6
+1,8
@@
#!/bin/sh
# Walks through the package names in the argument-selected files of
# apt-mark/ and ensures the respective packages are installed.
#!/bin/sh
# Walks through the package names in the argument-selected files of
# apt-mark/ and ensures the respective packages are installed.
+#
+# Ignores anything in an apt-mark/ file after the last newline.
set -e
config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/"
set -e
config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/"
@@
-8,6
+10,7
@@
config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/"
for target in "$@"; do
path="${config_tree_prefix}${target}"
cat "${path}" | while read line; do
for target in "$@"; do
path="${config_tree_prefix}${target}"
cat "${path}" | while read line; do
+ echo "$line"
if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
apt-get -y install "${line}"
fi
if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
apt-get -y install "${line}"
fi
diff --git
a/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4
b/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4
index f56878949562613bf3bdbadfb618d851c26a5481..01dca753763dc25509bc048a947eb2c9a3f59a08 100644
(file)
--- a/
all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4
+++ b/
all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4
@@
-8,4
+8,5
@@
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-COMMIT
\ No newline at end of file
+COMMIT
+# iptables-restore seems to ignore COMMIT if no newline follows it
\ No newline at end of file
diff --git
a/all_new_2018/setup_server.sh
b/all_new_2018/setup_server.sh
index c3d5ce5f54c0e02c48762a42c455db78230a5462..ea3437a444c899911e08800f2a613ffdcef627d6 100755
(executable)
--- a/
all_new_2018/setup_server.sh
+++ b/
all_new_2018/setup_server.sh
@@
-5,7
+5,7
@@
set -e
# Provide maximum input for set_hostname_and_fqdn.sh.
if [ "$#" -ne 2 ]; then
# Provide maximum input for set_hostname_and_fqdn.sh.
if [ "$#" -ne 2 ]; then
- echo
"Need exactly two arguments (hostname, FQDN)."
+ echo
'Need exactly two arguments (hostname, FQDN).'
false
fi
hostname="$1"
false
fi
hostname="$1"
@@
-21,8
+21,8
@@
fqdn="$2"
# Some debconf selections we don't want to get asked during coming
# install actions.
# Some debconf selections we don't want to get asked during coming
# install actions.
-debconf-set-selections <<< "iptables-persistent iptables-persistent/autosave_v4 boolean false"
-debconf-set-selections <<< "iptables-persistent iptables-persistent/autosave_v6 boolean false"
+echo 'iptables-persistent iptables-persistent/autosave_v4 boolean false' | debconf-set-selections
+echo 'iptables-persistent iptables-persistent/autosave_v6 boolean false' | debconf-set-selections
# Ensure package installation state as defined by what packages are
# defined as required by Debian policy and by settings in ./apt-mark/.
# Ensure package installation state as defined by what packages are
# defined as required by Debian policy and by settings in ./apt-mark/.