From f5928c13d8dea983e8f81d0280c0318f8c2bdefa Mon Sep 17 00:00:00 2001 From: SolAZDev Date: Mon, 15 Jan 2024 20:25:20 -0400 Subject: [PATCH] clean up? --- conf/motioneye.conf | 2 +- conf/systemd.service | 4 ++-- scripts/install | 17 ++--------------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/conf/motioneye.conf b/conf/motioneye.conf index 395a544..3e66855 100644 --- a/conf/motioneye.conf +++ b/conf/motioneye.conf @@ -1,5 +1,5 @@ # path to the configuration directory (must be writable by motionEye) -conf_path /etc/motioneye +conf_path /var/www/__APP__ # path to the directory where pid files go (must be writable by motionEye) run_path /run/motioneye diff --git a/conf/systemd.service b/conf/systemd.service index fb24656..745669f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,8 +6,8 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__INSTALL_DIR__/venv -ExecStart=__INSTALL_DIR__/venv/bin/meyectl startserver -c /etc/motioneye/motioneye.conf +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=__INSTALL_DIR__/bin/meyectl startserver -c /var/www/__APP__/motioneye.conf StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit Restart=on-abort diff --git a/scripts/install b/scripts/install index 04c1e99..1512c5a 100755 --- a/scripts/install +++ b/scripts/install @@ -44,13 +44,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -mkdir -p /etc/motioneye -mkdir -p /var/lib/motioneye -ynh_add_config --template="../conf/motioneye.conf" --destination="/etc/motioneye/motioneye.conf" - -chmod 664 "/etc/motioneye/motioneye.conf" -chown $app:$app "/etc/motioneye/motioneye.conf" - +ynh_add_config --template="../conf/motioneye.conf" --destination="/var/www/__APP__/motioneye.conf" #================================================= # SETUP APPLICATION #================================================= @@ -69,14 +63,7 @@ popd #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -mkdir -p /etc/motioneye -mkdir -p /var/lib/motioneye -ynh_add_config --template="../conf/motioneye.conf" --destination="/etc/motioneye/motioneye.conf" - -chown $app:$app "/etc/motioneye/" -chown $app:$app "/var/lib/motioneye" -chmod 664 "/etc/motioneye/" -chmod 664 "/var/lib/motioneye" +ynh_add_config --template="../conf/motioneye.conf" --destination="/var/www/__APP__/motioneye.conf" #================================================= # GENERIC FINALIZATION