Last active
October 29, 2024 14:27
-
-
Save cloudnull/7244539b7481fe23a35d50f7d4b07573 to your computer and use it in GitHub Desktop.
Revisions
-
cloudnull revised this gist
Oct 16, 2022 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -27,10 +27,8 @@ if ! grep -q JAVA_HOME /etc/environment; then echo export JAVA_HOME=${JAVA_HOME} | tee -a /etc/environment fi update-alternatives --remove-all java || true update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 20 # Install unifi sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg -
cloudnull revised this gist
Sep 6, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pushd /usr/lib/jvm popd if ! grep -q java /etc/profile; then echo "export PATH=\"$(find /usr/lib/jvm/ -type d -name bin | tr '\n' ':')\${PATH}\"" | tee -a /etc/profile fi JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -type d | tail -n 1) -
cloudnull revised this gist
Sep 6, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,8 @@ pushd /usr/lib/jvm tar -xf java.tgz popd if ! grep -q java /etc/profile; then echo export PATH=\${PATH}:$(echo $(find /usr/lib/jvm/ -type d -name bin | sed 's/:$/\n/') | tr ' ' ':') | tee -a /etc/profile fi JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -type d | tail -n 1) -
cloudnull revised this gist
Sep 6, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pushd /usr/lib/jvm popd if ! grep -q java /etc/environment; then echo export PATH=\${PATH}:$(find /usr/lib/jvm/ -type d -name bin | sed 's/:$/\n/') | tee -a /etc/profile fi JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -type d | tail -n 1) -
cloudnull revised this gist
Sep 5, 2022 . No changes.There are no files selected for viewing
-
cloudnull revised this gist
Sep 4, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,7 @@ if ! grep -q JAVA_HOME /etc/environment; then echo export JAVA_HOME=${JAVA_HOME} | tee -a /etc/environment fi update-alternatives --remove-all java pushd /usr/bin ln -s ${JAVA_HOME}/bin/java popd -
cloudnull revised this gist
Sep 4, 2022 . 2 changed files with 48 additions and 44 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,44 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ #!/usr/bin/env bash set -ev set -o pipefail # Install dependencies apt update apt -y install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common # Install old mongo (requried). wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add - echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list # Get compatible java and set it up mkdir -p /usr/lib/jvm pushd /usr/lib/jvm wget 'https://javadl.oracle.com/webapps/download/AutoDL?BundleId=246799_424b9da4b48848379167015dcc250d8d' -O java.tgz tar -xf java.tgz popd if ! grep -q java /etc/environment; then echo export PATH=\${PATH}:$(find /usr/lib/jvm/ -type d -name bin | sed 's/:$/\n/') | tee -a /etc/environment fi JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -type d | tail -n 1) if ! grep -q JAVA_HOME /etc/environment; then echo export JAVA_HOME=${JAVA_HOME} | tee -a /etc/environment fi pushd /usr/bin ln -s ${JAVA_HOME}/bin/java popd # Install unifi sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list # Ensure that the unifi service knows where java 8 is. if ! grep -q JAVA_HOME /lib/systemd/system/unifi.service; then mkdir -p /etc/systemd/system/unifi.service.d/ echo -e "[Service]\nEnvironment=JAVA_HOME=${JAVA_HOME}" | sudo tee /etc/systemd/system/unifi.service.d/local.conf systemctl daemon-reload fi apt update apt -y install unifi systemctl restart unifi.service -
cloudnull revised this gist
Jan 12, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,8 @@ apt update && apt -y install unifi # Ensure that the unifi service knows where java 8 is. if ! grep -q JAVA_HOME /lib/systemd/system/unifi.service; then mkdir -p /etc/systemd/system/unifi.service.d/ echo -e "[Service]\nEnvironment=JAVA_HOME=${JAVA_HOME}" | tee /etc/systemd/system/unifi.service.d/local.conf systemctl daemon-reload systemctl restart unifi.service fi -
cloudnull created this gist
Apr 10, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ #!/usr/bin/env bash # Install dependencies apt install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common multiarch-support # Install old mongo (requried). wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add - echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb # Get compatible java and set it up wget 'https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244058_89d678f2be164786b292527658ca1605' -O java.tgz mkdir -p /usr/lib/jvm pushd /usr/lib/jvm tar -xf /tmp/java.tgz popd if ! grep -q java /etc/environment; then echo export PATH=\${PATH}:$(find /usr/lib/jvm/ -type d -name bin | sed 's/:$/\n/') | tee -a /etc/environment fi JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -type d | tail -n 1) if ! grep -q JAVA_HOME /etc/environment; then echo export JAVA_HOME=${JAVA_HOME} | tee -a /etc/environment fi pushd /usr/local/bin ln -s ${JAVA_HOME}/bin/java popd # Install unifi apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50 echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | tee /etc/apt/sources.list.d/100-ubnt-unifi.list apt update && apt -y install unifi # Ensure that the unifi service knows where java 8 is. if ! grep -q JAVA_HOME /lib/systemd/system/unifi.service; then sed -i "/^\[Service\]$/a Environment=JAVA_HOME=${JAVA_HOME}" /lib/systemd/system/unifi.service systemctl daemon-reload systemctl restart unifi.service fi