Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyclenerd/postinstall
💻 Bash Script to automate post-installation steps
https://github.com/cyclenerd/postinstall
alpine-linux arch-linux bash centos cygwin debian fedora freebsd hacktoberfest macos netbsd openbsd openwrt postinstall redhat slackware suse termux ubuntu
Last synced: 22 days ago
JSON representation
💻 Bash Script to automate post-installation steps
- Host: GitHub
- URL: https://github.com/cyclenerd/postinstall
- Owner: Cyclenerd
- License: gpl-3.0
- Created: 2016-11-29T18:52:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-18T14:41:19.000Z (over 1 year ago)
- Last Synced: 2025-01-02T17:16:40.242Z (about 1 month ago)
- Topics: alpine-linux, arch-linux, bash, centos, cygwin, debian, fedora, freebsd, hacktoberfest, macos, netbsd, openbsd, openwrt, postinstall, redhat, slackware, suse, termux, ubuntu
- Language: Shell
- Homepage:
- Size: 240 KB
- Stars: 155
- Watchers: 13
- Forks: 37
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# postinstall.sh
[![ShellCheck](https://github.com/Cyclenerd/postinstall/actions/workflows/shellcheck.yml/badge.svg?branch=master)](https://github.com/Cyclenerd/postinstall/actions/workflows/shellcheck.yml)
[![Ubuntu 20.04 LTS](https://github.com/Cyclenerd/postinstall/actions/workflows/ubuntu_2004.yml/badge.svg?branch=master)](https://github.com/Cyclenerd/postinstall/actions/workflows/ubuntu_2004.yml)Bash Script to automate post-installation steps.
Helps to install packages on different operating systems:* [x] Alpine Linux
* [x] Android (Termux)
* [x] Apple macOS
* [x] Arch Linux
* [x] CentOS
* [x] Debian
* [x] Fedora
* [x] FreeBSD
* [x] Haiku
* [x] Mageia
* [x] NetBSD
* [x] OpenBSD
* [x] OpenWRT
* [x] Puppy
* [x] RedHat
* [x] RockyLinux
* [x] Slackware
* [x] SUSE
* [x] Ubuntu
* [x] Windows (Cygwin)## Overview
`postinstall.sh` is simple bash shell script which in turn generates scripts.
The generation depends on the operating system and type of installation.
The templates that are included in the generation can be stored in the file system or on a web server.
This can also be your GitHub repository.
Just fork this repository and edit it according to your needs.`postinstall.sh` is not a configuration management system.
If you want to install many servers automatically, you should look at [ansible](https://github.com/ansible/ansible).
But if you want to quickly reinstall your laptop or Raspberry Pi, `postinstall.sh` can help you.__Please check the [Wiki](https://github.com/Cyclenerd/postinstall/wiki/postinstall.sh) for more information.__
## Installation
Download:
```shell
curl -O "https://raw.githubusercontent.com/Cyclenerd/postinstall/master/postinstall.sh"
```Alternative download with short URL:
```shell
curl -fL http://bit.ly/get_postinstall -o postinstall.sh
```Create a package lists and scripts as explained in this [repository](https://github.com/Cyclenerd/postinstall/tree/master/base) or in the [Wiki](https://github.com/Cyclenerd/postinstall/wiki/postinstall.sh).
Example:
```shell
mkdir install
cd install
vi packages.list
```Run as root:
```shell
bash postinstall.sh -b install
```## Usage
```txt
Usage: postinstall.sh [-t ] [-b ] [-h]:
[-t ] sets the type of installation (default: server)
[-b ] sets the base url or dir (default: https://raw.githubusercontent.com/Cyclenerd/postinstall/master/base)
[-h] displays help (this message)
```Example: `postinstall.sh` or `postinstall.sh -t workstation`
## Screenshot
![WSL](img/WSL_Screenshot.jpg)
## Program Flow
* Determine operating system and architecture
* Check package manager and requirements
* Generate script to run before and after installation and list of packages to install
* Install packages## Requirements
Only `bash`, `curl`, `tput` (`ncurses-utils`) and a package manager for the respective operating system:
* Alpine Linux → `apk`
* Apple macOS → `port` or `brew`
* Arch Linux → `pacman`
* Cygwin → `apt-cyg`
* Debian / Ubuntu → `apt-get`
* FreeBSD → `pkg`
* Haiku → `pkgman`
* Mageia → `urpmi`
* NetBSD → `pkg_add`
* OpenBSD → `pkg_add`
* OpenWRT → `opkg`
* Puppy → `pkg` (https://gitlab.com/sc0ttj/Pkg)
* Red Hat / Fedora / CentOS → `dnf` or `yum`
* Slackware → `slackpkg`
* SUSE / openSUSE → `zypper`
* Termux → `pkg`## TODO
* More and better documentation
* Support for even more operating systems and package managersHelp is welcome 👍
## License
GNU Public License version 3.
Please feel free to fork and modify this on GitHub (https://github.com/Cyclenerd/postinstall).