fix readme config

add postinstall
master
Muhammad Hussein Fattahizdeh 2016-11-14 21:10:52 +03:30
parent 94df215691
commit cb1dcdeb3d
4 changed files with 21 additions and 6 deletions

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

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
post-install.sh Normal file
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

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