Browse Source

fix readme config

add postinstall
master
Muhammad Hussein Fattahizdeh 4 years ago
parent
commit
cb1dcdeb3d
4 changed files with 21 additions and 6 deletions
  1. +11
    -5
      README.md
  2. +1
    -1
      config.sample
  3. +7
    -0
      post-install.sh
  4. +2
    -0
      preseed.cfg.template

+ 11
- 5
README.md View File

@ -14,8 +14,6 @@ Create your own netiso and reinstall it over ssh. You can partion yor server as
2. Clone this repo to your server
3. Copy `config.sample` to `config` file and edit field by field exactly:
```
#!/bin/bash
# country
COUNTRY='IR'
@ -27,14 +25,14 @@ Create your own netiso and reinstall it over ssh. You can partion yor server as
INTERFACE_NAMESERVERS='4.2.2.4'
# preseed file: upload created preseed.cfg to your own host before reboot system
PRESEED_URL="http://10.1.1.2/preseed.cfg"
PRESEED_URL="http://yourserver.tld/preseed.cfg"
# ssh installer password
PASSWORD="tHISiSpASSWORD"
# hostname and domain
HOSTNAME="${INTERFACE_IP//\./\-}-$COUNTRY_LOWER"
DOMAIN="servers.aasaam.net"
HOSTNAME="${INTERFACE_IP//\./\-}"
DOMAIN="servers.domain.org"
# lowercase of country code dont change it
COUNTRY_LOWER="${COUNTRY,,}"
@ -71,6 +69,14 @@ Remember you must do as root user also
...
Your password is tHISiSpASSWORD
```
#### Upload your preseed file
Upload your preseed.cfg file to configured location `PRESEED_URL`.
You can test it. We must get 200 response as we expected
```
curl -o /dev/null --silent --head --write-out '%{http_code}\n' http://yourserver.tld/preseed.cfg
200
```
#### Reboot
```
reboot

+ 1
- 1
config.sample View File

@ -18,7 +18,7 @@ PASSWORD="tHISiSpASSWORD"
# hostname and domain
HOSTNAME="${INTERFACE_IP//\./\-}"
DOMAIN="servers.aasaam.net"
DOMAIN="servers.domain.org"
# lowercase of country code dont change it
COUNTRY_LOWER="${COUNTRY,,}"

+ 7
- 0
post-install.sh View File

@ -0,0 +1,7 @@
#!/bin/bash
# sysdig
# curl -s https://s3.amazonaws.com/download.draios.com/stable/install-sysdig | bash
# fluentd
# curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent2.sh | sh

+ 2
- 0
preseed.cfg.template View File

@ -19,3 +19,5 @@ d-i hw-detect/load_firmware boolean true
d-i anna/choose_modules string network-console
d-i network-console/password password PASSWORD
d-i network-console/password-again password PASSWORD
# d-i pkgsel/include string ntp htop iotop curl
# d-i preseed/late_command string in-target post-install.sh

Loading…
Cancel
Save