Compare commits

..

5 commits

Author SHA1 Message Date
M Rizky Satrio
3198215ee2
Merge 7c912e656f into 3232781a6d 2025-07-04 22:56:40 +07:00
t3chn0m4g3
3232781a6d fix var expansion 2025-07-04 17:29:19 +02:00
natitomattis
1c259e8b10
Adjust restore procedure on upgrade.sh (#1777)
* small fix on upgrade.sh
* typo
2025-07-04 17:17:49 +02:00
rsatrio
7c912e656f chore: revise install.sh script 2025-07-04 22:08:22 +07:00
dz
8e79c596f3
Comment out Port(s) in sshd_config to avoid port conflicts when multiple SSH Port definitions present (#1809)
- Comment out Port(s) in sshd_config to avoid port conflicts when multiple SSH Port definitions present
- Resolve duplication issue for repeatedly running the install playbook
- Avoid accidental uncommenting of Port 22
2025-07-04 16:57:00 +02:00
4 changed files with 38 additions and 4 deletions

View file

@ -3,10 +3,10 @@
print_help() {
echo "Usage: $0 [-s y|n] [-t h|s|l|i|m|t] -u <webuser name> -p <password for web user>"
echo " -s: yes or no (optional)"
echo " -t: h (host),s (sensor), l (llm), i(mini),m(mobile),t(tarpit) (optional)"
echo " -u: web username (optional)"
echo " -p: password for web user (optional)"
echo " -s: Supress Install(y/n) question. Value accepted: yes or no (optional)"
echo " -t: Type of installation. Value accepted: h (hive),s (sensor), l (llm), i(mini),m(mobile),t(tarpit) (optional)"
echo " -u: web username (mandatory for hive installation, otherwirse optional)"
echo " -p: password for web user (mandatory for hive installation, otherwirse optional)"
exit 1
}

View file

@ -478,6 +478,21 @@
tags:
- "Ubuntu"
- name: Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu)
ansible.builtin.replace:
path: /etc/ssh/sshd_config
regexp: '^(Port (?!64295$)[0-9]+)'
replace: '# \1'
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
tags:
- "AlmaLinux"
- "Debian"
- "Fedora"
- "openSUSE Tumbleweed"
- "Raspbian"
- "Rocky"
- "Ubuntu"
- name: Change SSH Port to 64295 (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
lineinfile:
path: /etc/ssh/sshd_config

View file

@ -215,6 +215,21 @@
- "Rocky"
- "Ubuntu"
- name: Revert Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu)
ansible.builtin.replace:
path: /etc/ssh/sshd_config
regexp: '^# (Port (?!22$)[0-9]+)'
replace: '\1'
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
tags:
- "AlmaLinux"
- "Debian"
- "Fedora"
- "openSUSE Tumbleweed"
- "Raspbian"
- "Rocky"
- "Ubuntu"
- name: Remove vm.max_map_count setting (All)
lineinfile:
path: /etc/sysctl.conf

View file

@ -188,6 +188,10 @@ function fuRESTORE () {
fi
echo "### Restoring T-Pot config file .env"
tar xvf $myARCHIVE .env -C $HOME/tpotce >/dev/null 2>&1
# Backup file (.env) contains a record of the TPOT_VERSION that is used in docker-compose commmands.
# We should upgrade the version in this file after restoring the backup.
newVERSION=$(cat version)
sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env
}
################