bluecherrydvr / bluecherry-apps

Bluecherry surveillance system (server application)
http://www.bluecherrydvr.com
GNU General Public License v2.0
217 stars 68 forks source link

Restart web server after it's added to bluecherry group #671

Open andrey-utkin opened 8 months ago

andrey-utkin commented 8 months ago

The current problem is that running web requests immediately after install gives "Fatal error: could not read configuration file."

andrey-utkin commented 8 months ago

Current patch causes a new problem :(

Preparing to unpack .../109-bluecherry_3%3a3.1.0-rc10_amd64.deb ...
sed: can't read /etc/bluecherry.conf: No such file or directory
Failed to stop apache2.service: Unit apache2.service not loaded.
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
dpkg: error processing archive /tmp/apt-dpkg-install-58cAKI/109-bluecherry_3%3a3.1.0-rc10_amd64.deb (--unpack):
 new bluecherry package pre-installation script subprocess returned error exit status 1
andrey-utkin commented 8 months ago

The problem seem to be coming from the fact that we haven't saved a config file yet. So I looked at the postinst.

Looking at debian/bluecherry.postinst and misc/postinstall.sh, we seem to be already stopping and starting nginx. But evidently it's not bringing the desired nginx behaviour.