1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/motioneye_ynh.git synced 2024-09-03 19:46:09 +02:00

moved permissions

This commit is contained in:
SolAZDev 2023-09-08 17:04:59 -04:00
parent eb0168e19b
commit 6842a2bc27

View file

@ -133,15 +133,6 @@ mkdir -p /etc/motioneye
mkdir -p /var/lib/motioneye mkdir -p /var/lib/motioneye
ynh_add_config --template="../conf/motioneye.conf" --destination="/etc/motioneye/motioneye.conf" 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, ### 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) ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
@ -180,6 +171,18 @@ popd
#================================================= #=================================================
# START SYSTEMD SERVICE # 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_script_progression --message="Starting a systemd service..." --weight=1
### `ynh_systemd_action` is used to start a systemd service for an app. ### `ynh_systemd_action` is used to start a systemd service for an app.