2019-01-09 03:13:27 -07:00
|
|
|
# My standard configuration files for Debian and basic services
|
|
|
|
|
|
|
|
This is a collection of several configuration files that I use when setting up a
|
|
|
|
BASIC bare-bones Debian system. Quite often, such a system will become
|
|
|
|
something else like a webserver, git-server, cloud platform, programming
|
|
|
|
workstation, etc. Therefore, only a few core files applicable to nearly every
|
|
|
|
conceivable installation are included here.
|
|
|
|
|
2019-01-09 04:17:35 -07:00
|
|
|
This archive and included script are meant to supplement my article on setting
|
|
|
|
up a Debian base-system found at https://mytechiethoughts.com/<post_address>
|
|
|
|
|
2019-01-09 03:13:27 -07:00
|
|
|
## Included files
|
|
|
|
|
2019-01-09 04:17:35 -07:00
|
|
|
Please refer to the readme.md in each subdirectory for a list and description of
|
|
|
|
each included file.
|
|
|
|
|
|
|
|
## The script file (customize.sh)
|
|
|
|
|
|
|
|
The included script file copies all the files in this archive to the proper
|
|
|
|
locations on a default Debian system. It makes backups of your existing files
|
|
|
|
in-place with the extension *.original*. This simply saves you time and
|
|
|
|
possible errors copying the files manually. The structure of this archive
|
|
|
|
exactly mirrors a default Debian installation, so you can use that as a guide if
|
|
|
|
you choose not to use the script.
|
|
|
|
|
|
|
|
### Running the script
|
|
|
|
|
|
|
|
Please note you must either make the script executable or call it explicitly via
|
|
|
|
BASH. In the latter case, you'd run the script as follows:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
/bin/bash ./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to make the script executable:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
chmod +x customize.sh
|
|
|
|
./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
Due to location of the files being replaced, **you MUST run this script as ROOT**
|
|
|
|
(the script will exit if you run as a different user) or run it via sudo like
|
|
|
|
this (assuming you made it executable):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo ./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
### Passing a custom path to the script
|
|
|
|
|
|
|
|
If you want to test out the script before having it update your actual system
|
|
|
|
configuration, you can supply an alternate destination path. This is referred
|
|
|
|
to as a 'Base Path' by the script and it will show a warning if this option is
|
|
|
|
used. Please note, your 'Base Path' MUST have the same directory structure as
|
|
|
|
an actual system, so the expected directories must already exist or the script
|
|
|
|
will just throw errors and not actually copy files.
|
|
|
|
|
|
|
|
Let's assume you wanted to test the script and copy files to */testdir*. You
|
|
|
|
would do the following prepare the directory with the expected structure:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
mkdir -p /testdir/root
|
|
|
|
mkdir -p /testdir/etc/{skel,ssh,systemd}
|
|
|
|
```
|
|
|
|
|
|
|
|
Then you could invoke the script as follows:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
customize.sh /testdir
|
|
|
|
```
|
|
|
|
|
|
|
|
The script would then copy all files into */testdir* while mirroring the
|
|
|
|
structure of a live system beneath that. Again, this is useful only for testing
|
|
|
|
and will NOT update your actual system!
|
2018-07-21 16:57:17 -06:00
|
|
|
|
2019-01-09 04:17:35 -07:00
|
|
|
## Final thoughts
|