From 6842a2bc277dc0cb72957d8223cecdabe21542c6 Mon Sep 17 00:00:00 2001 From: SolAZDev Date: Fri, 8 Sep 2023 17:04:59 -0400 Subject: [PATCH] moved permissions --- scripts/install | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index be72e1c..76a0ed8 100755 --- a/scripts/install +++ b/scripts/install @@ -133,15 +133,6 @@ mkdir -p /etc/motioneye mkdir -p /var/lib/motioneye ynh_add_config --template="../conf/motioneye.conf" --destination="/etc/motioneye/motioneye.conf" -# FIXME: this should be handled by the core in the future -# You may need to use chmod 600 instead of 400, -# for example if the app is expected to be able to modify its own config -chown motion:motion "/etc/motioneye/" -chown motion:motion "/etc/motioneye/motioneye.conf" -chown motion:motion "/var/lib/motioneye" -chmod 664 "/etc/motioneye/motioneye.conf" -chmod 664 "/etc/motioneye/" -chmod 664 "/var/lib/motioneye" ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) @@ -180,6 +171,18 @@ popd #================================================= # START SYSTEMD SERVICE #================================================= + + +# FIXME: this should be handled by the core in the future +# You may need to use chmod 600 instead of 400, +# for example if the app is expected to be able to modify its own config +chown motion:motion "/etc/motioneye/" +chown motion:motion "/etc/motioneye/motioneye.conf" +chown motion:motion "/var/lib/motioneye" +chmod 664 "/etc/motioneye/motioneye.conf" +chmod 664 "/etc/motioneye/" +chmod 664 "/var/lib/motioneye" + ynh_script_progression --message="Starting a systemd service..." --weight=1 ### `ynh_systemd_action` is used to start a systemd service for an app.