mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 01:50:24 -05:00
Merge branch 'new-schema'
The Rust portions of the merge are straightforward, but the Javascript is not. The new-schema branch is based on my hacky prototype UI; the master branch is based on Dolf's rewrite. I attempted to match the new-schema changes in Dolf's new structure.
This commit is contained in:
@@ -104,7 +104,6 @@ After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=${SERVICE_BIN} run \\
|
||||
--sample-file-dir=${SAMPLE_MEDIA_DIR}/${SAMPLE_FILE_DIR} \\
|
||||
--db-dir=${DB_DIR} \\
|
||||
--ui-dir=${LIB_DIR}/ui \\
|
||||
--http-addr=0.0.0.0:${NVR_PORT}
|
||||
|
||||
@@ -359,25 +359,6 @@ fix_localtime()
|
||||
fi
|
||||
}
|
||||
|
||||
# Add/update cameras in the database
|
||||
#
|
||||
# $1: path to cameras.sql file
|
||||
# $2: moonfire service name
|
||||
# $3: moonfire user name
|
||||
# $4: moonfire database path
|
||||
#
|
||||
addCameras()
|
||||
{
|
||||
local cpath="${CAMERAS_PATH:-$1}"
|
||||
if [ -r "${cpath}" ]; then
|
||||
echo_info -x 'Add cameras...'
|
||||
# Before adding cameras, must stop service
|
||||
moonfire stop "${SERVICE_NAME:-$2}" >/dev/null 2>&1
|
||||
sudo -u ${NVR_USER:-$3} -H sqlite3 "${DB_PATH:-$4}" < "${cpath}"
|
||||
moonfire start "${SERVICE_NAME:-$2}" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
pre_install_prep()
|
||||
{
|
||||
prep_moonfire_user
|
||||
|
||||
@@ -173,25 +173,6 @@ trap finish EXIT
|
||||
pre_install_prep
|
||||
|
||||
|
||||
# Initialize camera from sql file if present
|
||||
# (DEPRECATED: Will be removed in future version
|
||||
#
|
||||
CAMERAS_PATH="${MOONFIRE_DIR}/cameras.sql"
|
||||
if [ ! -r "${CAMERAS_PATH}" ]; then
|
||||
CAMERAS_PATH="${MOONFIRE_DIR}/../cameras.sql"
|
||||
if [ ! -r "${CAMERAS_PATH}" ]; then
|
||||
CAMERAS_PATH=
|
||||
fi
|
||||
fi
|
||||
if [ ! -z "${CAMERAS_PATH}" ]; then
|
||||
echo_warn "Camera configuration through sql file is deprecated and will not be supported in the future." \
|
||||
"Use \"moonfire-nvr config\" instead."
|
||||
echo_info -x "Adding camera confguration to db..."
|
||||
addCameras
|
||||
else
|
||||
echo_warn -x "No cameras auto configured. Use \"moonfire-nvr config\" to do it later..."
|
||||
fi
|
||||
|
||||
read_lines <<-'INSTRUCTIONS'
|
||||
Unless there are errors above, everything you need should have been installed
|
||||
and you are now ready to build, install, and then use moonfire.
|
||||
|
||||
Reference in New Issue
Block a user