Changed if to POSIX [] instead of [[]]

This commit is contained in:
2026-01-25 00:04:29 +01:00
parent 01bafc6ba0
commit 72e5bdfdf5
2 changed files with 23 additions and 17 deletions

View File

@@ -32,36 +32,42 @@ touch /etc/crontabs/cron-jobs
# Create symlinks based on what is passed
# Also add cronjobs when applicable
git clone $THE_REPO
if [[ "$EXTRA_REPOS" ]]; then
touch /etc/debmirror/Repo-IP-lists/CustomMirrorListV{4,6}
if [ "$EXTRA_REPOS" = true ]; then
touch /etc/debmirror/Repo-IP-lists/CustomMirrorListV4
touch /etc/debmirror/Repo-IP-lists/CustomMirrorListV6
ln -s /etc/debmirror/Repo-IP-lists/CustomMirrorListV4 /etc/debmirror/CustomMirrorListV4
ln -s /etc/debmirror/Repo-IP-lists/CustomMirrorListV6 /etc/debmirror/CustomMirrorListV6
# echo "00 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainCustom.py" >> /etc/crontabs/cron-jobs
fi
if [[ "$PROXMOX_REPOS" ]]; then
touch /etc/debmirror/Repo-IP-lists/ProxmoxMirrorListV{4,6}
if [ "$PROXMOX_REPOS" = true ]; then
touch /etc/debmirror/Repo-IP-lists/ProxmoxMirrorListV4
touch /etc/debmirror/Repo-IP-lists/ProxmoxMirrorListV6
ln -s /etc/debmirror/Repo-IP-lists/ProxmoxMirrorListV4 /etc/debmirror/ProxmoxMirrorListV4
ln -s /etc/debmirror/Repo-IP-lists/ProxmoxMirrorListV6 /etc/debmirror/ProxmoxMirrorListV6
# echo "05 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainSec.py" >> /etc/crontabs/cron-jobs
fi
if [[ "$DOCKER_REPOS" ]]; then
touch /etc/debmirror/Repo-IP-lists/DockerMirrorListV{4,6}
if [ "$DOCKER_REPOS" = true ]; then
touch /etc/debmirror/Repo-IP-lists/DockerMirrorListV4
touch /etc/debmirror/Repo-IP-lists/DockerMirrorListV6
ln -s /etc/debmirror/Repo-IP-lists/DockerMirrorListV4 /etc/debmirror/DockerMirrorListV4
ln -s /etc/debmirror/Repo-IP-lists/DockerMirrorListV6 /etc/debmirror/DockerMirrorListV6
# echo "05 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainSec.py" >> /etc/crontabs/cron-jobs
fi
if [[ "$DEBIAN_REPOS" ]]; then
touch /etc/debmirror/Repo-IP-lists/DebianMirrorListV{4,6}
if [ "$DEBIAN_REPOS" = true ]; then
touch /etc/debmirror/Repo-IP-lists/DebianMirrorListV4
touch /etc/debmirror/Repo-IP-lists/DebianMirrorListV6
ln -s /etc/debmirror/Repo-IP-lists/DebianMirrorListV4 /etc/debmirror/DebianMirrorListV4
ln -s /etc/debmirror/Repo-IP-lists/DebianMirrorListV6 /etc/debmirror/DebianMirrorListV6
# echo "10 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py" >> /etc/crontabs/cron-jobs
fi
if [[ "$OPNSENSE_REPOS" ]]; then
touch /etc/debmirror/Repo-IP-lists/OPNsenseMIrrorListV{4,6}
if [ "$OPNSENSE_REPOS" = true ]; then
touch /etc/debmirror/Repo-IP-lists/OPNsenseMirrorListV4
touch /etc/debmirror/Repo-IP-lists/OPNsenseMirrorListV6
ln -s /etc/debmirror/Repo-IP-lists/OPNsenseMirrorListV4 /etc/debmirror/OPNsenseMirrorListV4
ln -s /etc/debmirror/Repo-IP-lists/OPNsenseMirrorListV6 /etc/debmirror/OPNsenseMirrorListV6