Skip to content

Commit

Permalink
Support OpenSuSE in Docker test script
Browse files Browse the repository at this point in the history
  • Loading branch information
justaCasualCoder committed Nov 26, 2023
1 parent 4d884b1 commit c8d3a0b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions NewInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,19 @@ zypper addrepo https://download.opensuse.org/repositories/security:zoneminder/op
zypper --gpg-auto-import-keys refresh
zypper -n refresh
zypper -n install apache2 php php-mysql php-gd php-mbstring apache2-mod_php8 mariadb mariadb-client ZoneMinder php8-intl
if [ "$1" == "docker" ]; then
echo "Overwriting SystemD..."
wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -O /bin/systemctl
chmod +x /bin/systemctl
echo "Fixing MariaDB..."
/usr/libexec/mysql/mysql-systemd-helper install
echo "Done!"
fi
a2enmod rewrite
a2enmod headers
a2enmod expires
a2enmod php8
systemctl start mariadb
cat << EOF | mariadb
BEGIN;
CREATE DATABASE zm;
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/Test In Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Distro support for docker test script:
- [ ] Android ( [Termux](https://termux.dev/) Debian Proot - [My Install Scripts](https://github.com/justaCasualCoder/Zoneminder-Termux) )
- [x] Debian Linux
- [x] Fedora Linux
- [ ] OpenSuSE TumbleWeed
- [x] OpenSuSE TumbleWeed


Example running it (Have docker installed!):
Expand Down
11 changes: 11 additions & 0 deletions testindocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,16 @@ echo "root ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo y | TZ=Etc/UTC bash NewInstall.sh
EOF
}
opensuse() {
docker run --rm -v $(pwd):$(pwd) -w $(pwd) -i opensuse/tumbleweed << EOF
zypper --gpg-auto-import-keys refresh
zypper -n refresh
zypper -n install python3 wget curl sudo
wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -O /bin/systemctl
chmod +x /bin/systemctl
echo "root ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo y | TZ=Etc/UTC bash NewInstall.sh docker
EOF
}
$1

0 comments on commit c8d3a0b

Please sign in to comment.