Comments (6)
IS_UNIFI_2='false'
if [
then
IS_UNIFI_2='true'
else
echo "Unsupported firmware: ${FIRMWARE_VER}"
exit 1
fi
I've commented this out from the ubios-cert.sh script and ran with the initial
param and it worked!
I actually didn't even need to restart protect or unifi-core, looks like the script handled all of it.
Thanks for your help @alxwolf !
from ubios-cert.
This is a theoretical approach as I don't own an UniFi NVR to be able to check.
Looking at this page, it appears that certificate locations on UNVR are the same as on UDM. So that should work.
The only step left is to issue a systemctl restart unifi-protect
command, which the script currently does not do (or reboot the device, which we want to avoid to not interrupt network connection).
So you could try deploying the script on UNVR with a manual restart of device or service - if it does not work just trash the /data/ubios-cert/
folder and delete the LE .crt
and .key
in /data/unifi-core/config
. They will be re-created on next reboot (with standard UniFi self-signed cert) if the files don't exist.
from ubios-cert.
This is a theoretical approach as I don't own an UniFi NVR to be able to check.
Looking at this page, it appears that certificate locations on UNVR are the same as on UDM. So that should work.
The only step left is to issue a
systemctl restart unifi-protect
command, which the script currently does not do (or reboot the device, which we want to avoid to not interrupt network connection).So you could try deploying the script on UNVR with a manual restart of device or service - if it does not work just trash the
/data/ubios-cert/
folder and delete the LE.crt
and.key
in/data/unifi-core/config
. They will be re-created on next reboot (with standard UniFi self-signed cert) if the files don't exist.
So close! once I run "./deploy.sh" receive the following errors:
./deploy.sh: 6: ubnt-device-info: not found
./deploy.sh: 8: ubnt-device-info: not found
./deploy.sh: 20: [: -gt: unexpected operator
Unsupported firmware:
from ubios-cert.
Well, UNVR is not foreseen in this script, and the device seems to lack at least one required command.
Does the UNVR have a /data
directory?
On your own risk (if it goes wrong, it should not break "too much" - if anything), you could manually run these commands to achieve deployment:
set -e
DATA_DIR=/data
SCRIPT_DIR=$(dirname ${0})
ACME_URL=$(curl -s https://api.github.com/repos/acmesh-official/acme.sh/releases/latest | grep tarball_url | awk '{ print $2 }' | sed 's/,$//' | sed 's/"//g')
curl -L "${ACME_URL}" > acmesh.tar.gz
mkdir -p "${SCRIPT_DIR}/ubios-cert/acme.sh"
tar -xvf acmesh.tar.gz --directory="${SCRIPT_DIR}/ubios-cert/acme.sh" --strip-components=1
chmod +x ${SCRIPT_DIR}/ubios-cert/ubios-cert.sh
mv "${SCRIPT_DIR}/ubios-cert/" "${DATA_DIR}/ubios-cert/"
rm -rf ${SCRIPT_DIR}/../ubios-cert-main ~/ubios-cert.zip
echo "Deployed with success in ${DATA_DIR}/ubios-cert"
cd ${DATA_DIR}/ubios-cert
that is the bare minimum to grab acme.sh
and put everything in its place.
from ubios-cert.
Well, UNVR is not foreseen in this script, and the device seems to lack at least one required command.
Does the UNVR have a
/data
directory? On your own risk (if it goes wrong, it should not break "too much" - if anything), you could manually run these commands to achieve deployment:set -e DATA_DIR=/data SCRIPT_DIR=$(dirname ${0}) ACME_URL=$(curl -s https://api.github.com/repos/acmesh-official/acme.sh/releases/latest | grep tarball_url | awk '{ print $2 }' | sed 's/,$//' | sed 's/"//g') curl -L "${ACME_URL}" > acmesh.tar.gz mkdir -p "${SCRIPT_DIR}/ubios-cert/acme.sh" tar -xvf acmesh.tar.gz --directory="${SCRIPT_DIR}/ubios-cert/acme.sh" --strip-components=1 chmod +x ${SCRIPT_DIR}/ubios-cert/ubios-cert.sh mv "${SCRIPT_DIR}/ubios-cert/" "${DATA_DIR}/ubios-cert/" rm -rf ${SCRIPT_DIR}/../ubios-cert-main ~/ubios-cert.zip echo "Deployed with success in ${DATA_DIR}/ubios-cert" cd ${DATA_DIR}/ubios-cert
that is the bare minimum to grab
acme.sh
and put everything in its place.
Yup, /data does exist.
I'll run the above and will report back!
from ubios-cert.
OK So looks like using the modified deploy script worked but the ./ubios-cert.sh initial
command failed with the same unsupported firmware error.
I'll take a stab at it now to see if I can remove the firmware check.
from ubios-cert.
Related Issues (20)
- Cron job now requires the user to be specified HOT 3
- UDM pro upgraded to 2.x uses /data not /mnt/data HOT 3
- /mnt/data still hardcoded in ubios-cert.sh and 99-ubios-cert.sh HOT 2
- Script issues - support for UDMPro v2.4.23 HOT 2
- Issue with wildcard domains HOT 1
- Intermediate Chain Certificate for Guest Portal HOT 12
- Cloudflare not registrering - api not applied correctly HOT 1
- Add OVH as a DNS provider HOT 2
- No such file or directory when running cd ${DATA_DIR}/ubios-cert HOT 7
- Captive Portal HOT 3
- Can't open /data/unifi-core/config/unifi-core.crt for reading, No such file or directory HOT 2
- Curl Error HOT 2
- Email Notification HOT 2
- Copying `unifi-core-direct.crt` and `unifi-core-direct.key` is causing DNS for my domain to resolve to UDM console login HOT 7
- Guest portal cert doesn't seem to be updating. HOT 3
- missing keytool? HOT 2
- Minor error in README.MD? HOT 3
- FW 3.2.7 breaks RADIUS certificates HOT 25
- FW 3.2.7 breaks custom web certificates HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ubios-cert.