Skip to content

Commit

Permalink
Add Docs for testindocker.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
justaCasualCoder committed Nov 18, 2023
1 parent 72fb3a8 commit 2a33ca6
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 25 deletions.
8 changes: 3 additions & 5 deletions NewInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ rc-update add mysql default
rc-update add zoneminder default
}
echo -n "Are you sure you want to install Zoneminder? [y/n]: " ; read yn
if [ $1 = "Y" ]; then
yn=y
fi
if [ $yn = y ]; then
case $DISTRO in
"Debian"|"Debian Linux") [[ $(lsb_release -r | tr -d -c 0-9 ) = 12 ]] && Debian12_Install || Debian11_Install ;;
Expand All @@ -403,9 +406,4 @@ if [ $yn != y ]; then
printf "${RED}Aborted\n"
exit 0
fi
echo -n "Would you like to install ZM Event Server? This only works on Debian.. [y/n]: " ; read yn
if [ $yn = y ]; then
echo "===> Installing..."
install_evserver
fi
echo "You can now connect to Zoneminder at $(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}' | sed 's/.\{3\}$//')/zm"
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Zoneminder Install Script
This repository contains a script to install Zoneminder and a [LAMP](https://en.wikipedia.org/wiki/LAMP_(software_bundle)) Stack on the following linux distributions -
- Alpine Linux
- Arch Linux
- Ubuntu Linux
- Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- Debian Linux
- Fedora Linux
- OpenSuSE TumbleWeed
- [x] Alpine Linux
- [x] Arch Linux
- [x] Ubuntu Linux
- [x] Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- [x] Debian Linux
- [x] Fedora Linux (Need to test again)
- [x] OpenSuSE TumbleWeed
- Most other systems using Docker

Currently the most stable distro to install on is : **Debian**

If you would like a support for a Linux distro , create a issue and i will try to add support!
If you would like support for a differant Linux distro , create a issue and i will try to add support!

## Docker
Docker is now working - it is a very early image based on Debian - you can use it by running
Expand Down
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

This repository contains a script to install Zoneminder and a [LAMP](https://en.wikipedia.org/wiki/LAMP_(software_bundle)) Stack on the following linux distributions -

- Alpine Linux
- Arch Linux
- Ubuntu Linux
- Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- Debian Linux
- Fedora Linux
- OpenSuSE TumbleWeed
- [x] Alpine Linux
- [x] Arch Linux
- [x] Ubuntu Linux
- [x] Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- [x] Debian Linux
- [x] Fedora Linux (Need to test again)
- [x] OpenSuSE TumbleWeed
- Most other systems using Docker

Currently the most stable distro to install on is : **Debian**
Currently the most stable distro to install on is : **Debian 12**

If you would like a support for a Linux distro , create a issue and i will try to add support!

Expand Down
18 changes: 18 additions & 0 deletions docs/user-guide/Test In Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Testing in Docker
Currently in development, there is a script called `testindocker.sh`. The goal of this is to test multiple distros with the install script. It checks if localhost/zm connects and determines if Zoneminder is working or not.
Distro support for docker test script:

- [x] Alpine Linux
- [ ] Arch Linux
- [x] Ubuntu Linux
- [ ] Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- [ ] Debian Linux
- [ ] Fedora Linux (Need to test again)
- [ ] OpenSuSE TumbleWeed


Example running it (Have docker installed!):

```
./testindocker.sh Ubuntu
```
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ nav:
- 'Fedora': 'user-guide/Fedora.md'
- 'OpenSUSE': 'user-guide/OpenSUSE.md'
- 'Ubuntu': 'user-guide/Ubuntu.md'
- 'Testing Distros in Docker': 'user-guide/Test In Docker.md'
- About:
- 'License': 'LICENSE.txt'
- 'About': 'about.md'
repo_url: https://github.com/justaCasualCoder/Zoneminder-InstallerScript
markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
Expand Down
10 changes: 6 additions & 4 deletions testindocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ alpine=true
fi
}
Debian() {
sudo docker run --rm -v $(pwd):$(pwd) -w $(pwd) -i debian << EOF
apt update && apt install curl -y
sudo docker run --rm -v $(pwd):$(pwd) -w $(pwd) -p 80:80 -i debian << EOF
apt update && apt install curl lsb-release -y
cp fakesystemctl /bin/systemctl
chmod +x /bin/systemctl
# echo y | DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC bash NewInstall.sh
echo y | DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC bash NewInstall.sh Y
curl -Ssf --keepalive-time 5 --write-out "%{http_code}" localhost/zm/ &> /dev/null
# echo "Sleeping for 5min..."
# sleep 300
if [ $? != 0 ]; then
exit 1
else
Expand All @@ -68,5 +70,5 @@ echo "SUCCESS!"
debian=true
fi
}
Debian
$1

0 comments on commit 2a33ca6

Please sign in to comment.