Skip to content

Commit aa48f69

Browse files
committed
Refactor Initial Script Structure
Refactor App Installation Functions Enhance SSH Key Authentication Function Integrate User Input Handling Refactor Configuration Functions Improve Readability and Comments Fix Bug in Key Authentication Function Implement Auto-Delete of Script File Update README with Usage Instructions Update README with Badges and References modified: README.md new file: images/main_menu.png new file: images/passwordless_sudo_enabled.png modified: install.sh
1 parent 8c68d4b commit aa48f69

File tree

4 files changed

+368
-141
lines changed

4 files changed

+368
-141
lines changed

README.md

+32-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
## Script I use to install essential apps on new Ubuntu systems
1+
## Script I use to configure new Ubuntu systems
2+
3+
[![Code Size](https://img.shields.io/github/languages/code-size/Decaded/install-script)](https://github.com/Decaded/install-script)
4+
[![Open Issues](https://img.shields.io/github/issues/Decaded/install-script)](https://github.com/Decaded/install-script/issues)
5+
[![Open PRs](https://img.shields.io/github/issues-pr/Decaded/install-script)](https://github.com/Decaded/install-script/pulls)
6+
[![Last Commit](https://img.shields.io/github/last-commit/Decaded/install-script)](https://github.com/Decaded/install-script/commits)
7+
28

39
### Functions
410

@@ -10,16 +16,28 @@
1016
- [firewalld](https://firewalld.org/)
1117
- After installation will open provided SSH port
1218
- [fail2ban](https://github.com/fail2ban/fail2ban)
19+
- After installation will ask for configuration file;
20+
- default one
21+
- custom one (downloadable via url)
22+
- [modified by me](https://gist.github.com/Decaded/4a2b37853afb82ecd91da2971726234a)
23+
- [git](https://git-scm.com/)
24+
- After installation prompts for first-time configuration
25+
- [unattended-upgrades](https://help.ubuntu.com/community/AutomaticSecurityUpdates)
26+
- [unzip](https://linux.die.net/man/1/unzip)
1327

1428
- Option to disable password authentication and leave key-based only (as requested in [issue #1](https://github.com/Decaded/install-script/issues/1))
1529
- Asks for a public key that will be inserted into `$HOME/.ssh/authorized_keys`
30+
- if the key already exist in the file, new entry will not be made
31+
- `sshd_config` will be backed up to `/etc/ssh/sshd_config_decoscript.backup`
32+
- this will enable option `6` in the menu: `Restore SSH Configuration`
1633
- Option to enable passwordless sudo access for the user running this script
1734
- Won't do anything if the user already has this enabled
1835
- Option to install a basic web server ([nginx](https://www.nginx.com/) & [php8.1](https://www.php.net/releases/8_1_0.php)-fpm)
1936
- Opens ports 80 and 443 TCP/UDP in the firewall
2037
- Removes [Apache2](https://httpd.apache.org/) if it exists
2138
- Option to install [Node Version Manager](https://github.com/nvm-sh/nvm)
2239

40+
___
2341
### Usage
2442

2543
Download:
@@ -32,13 +50,19 @@ sudo chmod +x install.sh
3250
```
3351
Run script:
3452
```bash
35-
sudo ./install.sh
36-
```
37-
You can remove `install.sh` after installation is complete
38-
```bash
39-
rm install.sh
53+
./install.sh
4054
```
55+
And just pick what you need from the menu:
4156

57+
![Script in Action](images/main_menu.png)
58+
59+
___
60+
### Contributing
61+
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to submit a [issue](https://github.com/Decaded/install-script/issues).
62+
63+
___
4264
### Disclaimer
43-
> I am by no means an expert in this field.
44-
> You use this script at your own risk.
65+
66+
> I am by no means an expert in this field. You use this script at your own risk.
67+
68+
___

images/main_menu.png

26.2 KB
Loading

images/passwordless_sudo_enabled.png

11.1 KB
Loading

0 commit comments

Comments
 (0)