Skip to content

Commit

Permalink
fix: DSM cannot start up normally because it ran into a problem.
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
LaurentMarchelli committed Aug 15, 2020
1 parent adbee00 commit 8b53fd9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 37 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion INFO
Original file line number Diff line number Diff line change
@@ -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!"
Expand Down
Binary file added docs/Installation.of.Baikal.on.Synology.DSM5.pdf
Binary file not shown.
26 changes: 2 additions & 24 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}

Expand Down
40 changes: 28 additions & 12 deletions scripts/start-stop-status
Original file line number Diff line number Diff line change
Expand Up @@ -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
#--------------------------------------------------
Expand All @@ -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)
Expand All @@ -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
;;

Expand All @@ -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
;;

Expand Down

0 comments on commit 8b53fd9

Please sign in to comment.