Created
June 19, 2020 07:25
-
-
Save michaelgreenhill/ce70ba16a8bfabcdc1b412576c85b43a to your computer and use it in GitHub Desktop.
Stop qnap from taking over port 80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script replaces the config directive to run Qthttpd on port 80 with port 81 | |
# It then starts the Lancache container | |
# The entire block is wrapped in an if statement to check if it's already running... | |
if [[ $(docker container ls | grep lancache01$ | wc -l) == 0 ]]; then | |
/bin/sed -i -re 's#(\s+)("/usr/local/sbin/Qthttpd -p) (80) (.*)#\1\2 81 \4#' /etc/init.d/Qthttpd.sh | |
/etc/init.d/Qthttpd.sh restart | |
docker container start selby-lancache01 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment