diff --git a/CHANGELOG b/CHANGELOG index 99eaf1d..27e3650 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +0.4.6-002 +- Bug fixed : DSM cannot start up normally because it ran into a problem. Please contact the Synology support team for help. +(Too many symbolic link level for nginx) +- Install passed with DSM 6.2.3-25426-2 on DS211 & DS718+ +- Update from 0.4.6-001 passed with DSM 6.2.3-25426-2 on DS211 & DS718+ +- Legacy documentation added into ./docs folder + 0.4.6-001 - Now based on Baikal 0.4.6 - Add DSM 6.1 support with Ngnix diff --git a/INFO b/INFO index 51d37c5..d72d193 100644 --- a/INFO +++ b/INFO @@ -1,6 +1,6 @@ package="baikal" displayname="Baikal" -version="0.4.6-001" +version="0.4.6-002" firmware="6.1-14715" os_min_ver="6.1-14715" description="Baikal is a lightweight server that offers global and synchronized access to your calendars and address books over CalDAV and CardDAV. If you like this package, please consider making a small donation to the developer Jerome Schneider. === NOTE === Elaborate manual is available as PDF on the download site, strongly recommended!" diff --git a/docs/Installation.of.Baikal.on.Synology.DSM5.pdf b/docs/Installation.of.Baikal.on.Synology.DSM5.pdf new file mode 100644 index 0000000..4a00c2d Binary files /dev/null and b/docs/Installation.of.Baikal.on.Synology.DSM5.pdf differ diff --git a/scripts/functions.sh b/scripts/functions.sh index cee822d..b20eb68 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -62,7 +62,7 @@ log() # argument $1=text to log local prefix=`echo $1|sed "s/:.*$//g"` # Easier to enable debug mode [ "${prefix}" == "DEBUG" ] && return 0 - if [[ "${prefix}" != "DEBUG" ]] && [[ "${prefix}" != "INFO" ]]; then + if [ "${prefix}" != "DEBUG" ] && [ "${prefix}" != "INFO" ]; then echo "$1" >> ${SYNOPKG_TEMP_LOGFILE} fi echo -e "$(date "+%d-%b-%y %H:%M:%S") ${SYNOPKG_PKG_STATUS},$1" >> ${LogFile} @@ -188,17 +188,6 @@ postinst() # In that case you will have to uninstall/install fi - # Create required configuration links - local retval=0 - pushd "/var/packages/baikal/conf/" || retval=${?} - if [ ${retval} -eq 0 ]; then - find etc/* -name *.conf -exec ln -s ${PWD}/{} /{} \; || retval=${?} - popd - fi - if [ ${retval} -ne 0 ]; then - log "ERROR: failed to create configuration links" - exit 1 - fi log "INFO: installation of \"${SYNOPKG_PKGVER}\" finished" exit 0 } @@ -209,18 +198,7 @@ postinst() preuninst() { log "DEBUG: uninstall started" - - # Remove configuration links - local retval=0 - pushd "/var/packages/baikal/conf/" || retval=${?} - if [ ${retval} -eq 0 ]; then - find etc/* -name *.conf -exec rm /{} \; || retval=${?} - popd - fi - if [ ${retval} -ne 0 ]; then - log "ERROR: failed to remove configuration links" - exit 1 - fi + log "DEBUG: Dumping Synology variables : \n$(dump_var | sort)" exit 0 } diff --git a/scripts/start-stop-status b/scripts/start-stop-status index 461ec80..3531d68 100755 --- a/scripts/start-stop-status +++ b/scripts/start-stop-status @@ -94,6 +94,17 @@ case "$1" in log "INFO: system is booting, start \"${SYNOPKG_PKGNAME}\", version=\"${SYNOPKG_PKGVER}\"" fi + # Create required configuration files + pushd "/var/packages/baikal/conf/" >/dev/null; retval=${?} + if [ ${retval} -eq 0 ]; then + find etc/* -name *.conf -exec cp ${PWD}/{} /usr/local/{} \; || retval=${?} + popd >/dev/null + fi + if [ ${retval} -ne 0 ]; then + log "ERROR: failed to create configuration files" + exit 7 # LSB init error: Not running + fi + #-------------------------------------------------- # Make CardDAV, CalDAV and Web Admin available #-------------------------------------------------- @@ -102,12 +113,6 @@ case "$1" in exit 7 # LSB init error: Not running fi - ln -s ${PackageAppDir} ${PackageWebLink} - if [ $? -ne 0 ]; then - log "ERROR: cannot enable web files for package=\"${SYNOPKG_PKGNAME}\"" - exit 7 # LSB init error: Not running - fi - #-------------------------------------------------- # Enable the Web Admin interface for 1 hour # (or permanently, depending on your settings) @@ -123,6 +128,12 @@ case "$1" in fi fi + # Create status link + ln -sf ${PackageAppDir} ${PackageWebLink} + if [ $? -ne 0 ]; then + log "ERROR: cannot enable web files for package=\"${SYNOPKG_PKGNAME}\"" + exit 7 # LSB init error: Not running + fi exit 0 # LSB init okay ;; @@ -142,13 +153,18 @@ case "$1" in # Disable CardDAV, CalDAV and Web Admin # -h = test for symbolic link #-------------------------------------------------- - if [ -L ${PackageWebLink} ]; then - rm ${PackageWebLink} - if [ $? -ne 0 ]; then - log "ERROR: cannot disable web files for package=\"${SYNOPKG_PKGNAME}\"" - exit 7 # LSB init error: Not running - fi + # Remove configuration files + pushd "/var/packages/baikal/conf/" >/dev/null; retval=${?} + if [ ${retval} -eq 0 ]; then + find etc/* -name *.conf -exec rm -f /usr/local/{} \; || retval=${?} + popd >/dev/null + fi + if [ ${retval} -ne 0 ]; then + log "ERROR: failed to remove configuration files" + exit 1 fi + # Remove status link + rm -f ${PackageWebLink} exit 0 # LSB init okay ;;