[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: orthanc-postgresql



> > I would provide the following packages:
> > 
> > 	orthanc
> > 		main binary and general infrastructure
> > 		all the non-backend stuff
> > 	orthanc-sqlite
> > 		nearly empty package (?)
> > 		only providing orthanc.init without postgresql
> > 		perhaps providing backup/restore scripts for sqlite DB ?
> > 		Conflicts: orthanc-postgresql
> > 	orthanc-postgresql
> > 		providing orthanc.init with postgresql
> > 		providing PG backend plugin
> > 		Conflicts: orthanc-sqlite
> 
> Thanks! I will use this approach, as I think it is important to
> enforce a preference in favor of the default SQLite back-end.


Well... I have just discovered the "Should-Start:" syntax in LSB init scripts: "It defines the facilities that if present should start before the service provided by the script. Nevertheless, the script can still start if the listed facilities are missing. This allows for weak dependencies which do not cause the service to fail if a facility is not available." [1]

Therefore, I feel that the following header is sufficient to prevent the Orthanc service from starting before PostgreSQL (which was my initial fear that led to the discussion about orthanc-sqlite):

### BEGIN INIT INFO
# Provides:          orthanc
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Should-Start:      postgresql
# Should-Stop:       postgresql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Orthanc init script
# Description:       Orthanc, a lightweight, RESTful DICOM server
### END INIT INFO

As a consequence, I now think that there is no reason anymore to introduce the "orthanc-sqlite" package... this of course greatly simplifies the packaging.

Andreas, Karsten, please could you confirm that this approach is sound?

TIA,
Sébastien-


[1] https://wiki.debian.org/LSBInitScripts


Reply to: