1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/motioneye_ynh.git synced 2024-09-03 19:46:09 +02:00
This commit is contained in:
Éric Gaspar 2023-09-25 20:34:03 +02:00
commit 907985813d

View file

@ -63,19 +63,27 @@ pushd $install_dir
popd popd
#================================================= #=================================================
# GENERIC FINALIZATION # APP INITIAL CONFIGURATION
#================================================= #=================================================
# START SYSTEMD SERVICE # ADD A CONFIGURATION
#================================================= #=================================================
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"
# 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 $app:$app "/etc/motioneye/" chown $app:$app "/etc/motioneye/"
chown $app:$app "/var/lib/motioneye" chown $app:$app "/var/lib/motioneye"
chmod 664 "/etc/motioneye/" chmod 664 "/etc/motioneye/"
chmod 664 "/var/lib/motioneye" chmod 664 "/var/lib/motioneye"
#=================================================
# GENERIC FINALIZATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service