| Server IP : 193.86.120.172 / Your IP : 216.73.216.67 Web Server : Apache/2.4.63 (Unix) System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64 User : kubec ( 1026) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/packages/SynologyDrive/WIZARD_UIFILES/ |
Upload File : |
#!/bin/sh
PKG_STR_WIZARD_UPDATE_TITLE="Synology Drive Server installieren"
PKG_STR_WIZARD_UPDATE_DESC_CLOUD="Synology Drive Server ist der Nachfolger der Cloud Station."
PKG_STR_WIZARD_UPDATE_DESC_OFFICE="Synology Drive Server ist ein universelles Dateiportal mit Integration von Synology Office."
PKG_STR_WIZARD_UPDATE_DESC_CLOUD_OFFICE="Synology Drive Server ist der Nachfolger der Cloud Station und dient als Portal für Synology Office."
PKG_STR_WIZARD_INSTALL_ACTIVATE="var form=arguments[0];var isCloudStationMigrate=__IS_CLOUD_MIGRATE__,isShareSyncMigrate=__IS_SHARESYNC_MIGRATE__,isOfficeMigrate=__IS_OFFICE_MIGRATE__;if(1===form.items.items.length){var note=\\\"\\\";if(isCloudStationMigrate){note+=\\\"<li>\\\"+\\\"<b>Cloud Station Server</b> wird ersetzt: Daten und Einstellungen von <b>Cloud Station Server</b> werden zu <b>Synology Drive Server</b> migriert\\\"+\\\"</li>\\\"}if(isShareSyncMigrate){note+=\\\"<li>\\\"+\\\"<b>Cloud Station ShareSync</b> wird ersetzt: Daten und Einstellungen von <b>Cloud Station ShareSync</b> werden zu <b>Synology Drive Server</b> migriert\\\"+\\\"</li>\\\"}if(isOfficeMigrate){note+=\\\"<li>\\\"+\\\"<b>Synology Office</b> wird integriert: Daten von <b>Synology Office</b> werden zu <b>Synology Drive Server</b> migriert und können über das universelle Portal von <b>Synology Drive</b> geöffnet werden.\\\"+\\\"</li>\\\"}note+=\\\"<li>\\\"+\\\"Downgrade wird nicht unterstützt\\\"+\\\"</li>\\\";form.add(new SYNO.ux.DisplayField({htmlEncode:false,value:\\\"Bevor Sie Synology Drive Server installieren, beachten Sie bitte Folgendes:\\\"+\\\"<br>\\\"+\\\"<ul style='padding-left:5px;list-style:disc inside;'>\\\"+note+\\\"</ul><br><span>\\\"+\\\"Besuchen Sie vor dem Upgrade auf Synology Drive Server <a target=\\\\"_blank\\\\" href=\\\\"https://www.synology.com/knowledgebase/DSM/tutorial/Collaboration/What_do_I_need_to_know_before_upgrading_from_Cloud_Station_to_Synology_Drive_2_0\\\\">diese Seite</a> mit wichtigen Informationen.\\\"+\\\"</span>\\\"}));form.doLayout()}if(isCloudStationMigrate||isShareSyncMigrate){var container=arguments[1];var nextStepButton=container.owner.getButton('next');var backStepButton=container.owner.getButton('back');var clickEventListeners=[];nextStepButton.mons.forEach(function(item){if(item.ename==='click'){clickEventListeners.push(item)}});clickEventListeners.forEach(function(item){nextStepButton.mun(item.item,item.ename,item.fn,item.scope)});var onClickNextButton=function(e){var msgDescription=\\\"\\\";if(isCloudStationMigrate&&isShareSyncMigrate){msgDescription=\\\"Cloud Station Server und Cloud Station ShareSync werden nach der Installation durch Synology Drive Server ersetzt. Deren Einstellungen werden übernommen. Möchten Sie fortfahren?\\\"}else if(isCloudStationMigrate){msgDescription=\\\"Cloud Station Server wird nach der Installation durch Synology Drive Server ersetzt. Die Einstellungen werden übernommen. Möchten Sie fortfahren?\\\"}else if(isShareSyncMigrate){msgDescription=\\\"Cloud Station ShareSync wird nach der Installation durch Synology Drive Server ersetzt. Die Einstellungen werden übernommen. Möchten Sie fortfahren?\\\"}form.owner.getMsgBox().confirm(\\\"\\\",msgDescription,function(button){if(button==='yes'){clickEventListeners.forEach(function(item){nextStepButton.mon(item.item,item.ename,item.fn,item.scope)});nextStepButton.mun(nextStepButton.el,'click',onClickNextButton,nextStepButton);backStepButton.mun(backStepButton.el,'click',onClickBackButton,backStepButton);nextStepButton.el.dom.click()}})};var onClickBackButton=function(e){clickEventListeners.forEach(function(item){nextStepButton.mon(item.item,item.ename,item.fn,item.scope)});nextStepButton.mun(nextStepButton.el,'click',onClickNextButton,nextStepButton);backStepButton.mun(backStepButton.el,'click',onClickBackButton,backStepButton)};nextStepButton.mon(nextStepButton.el,'click',onClickNextButton,nextStepButton);backStepButton.mon(backStepButton.el,'click',onClickBackButton,backStepButton)}"
OFFICE_PKG_PATH="/var/packages/Spreadsheet/"
OFFICE_INFO_FILE=${OFFICE_PKG_PATH}"INFO"
CLOUDSTATION_PKG_PATH="/var/packages/CloudStation/"
CLOUDSTATIONCLIENT_PKG_PATH="/var/packages/CloudStationClient/"
VER_KEY="version"
OLD_OFFICE_MAJOR_VERSION=2
OLD_OFFICE_MINOR_VERSION=2
IsOfficeMigrate()
{
if [ ! -f "${OFFICE_INFO_FILE}" ]; then
return 0
fi
local office_major=$(/bin/get_key_value "${OFFICE_INFO_FILE}" "${VER_KEY}" | cut -d '.' -f 1)
local office_minor=$(/bin/get_key_value "${OFFICE_INFO_FILE}" "${VER_KEY}" | cut -d '.' -f 2)
if [ ${office_major} -lt ${OLD_OFFICE_MAJOR_VERSION} ] || [ ${office_major} -eq ${OLD_OFFICE_MAJOR_VERSION} -a ${office_minor} -le ${OLD_OFFICE_MINOR_VERSION} ]; then
return 1
fi
return 0
}
IsCloudStationMigrate()
{
if [ -d ${CLOUDSTATION_PKG_PATH} ]; then
return 1
fi
return 0
}
IsCloudStationClientMigrate()
{
if [ -d ${CLOUDSTATIONCLIENT_PKG_PATH} ]; then
return 1
fi
return 0
}
main()
{
local InstallPages=""
IsOfficeMigrate
local office_migrate=$?
IsCloudStationMigrate
local cloud_migrate=$?
IsCloudStationClientMigrate
local sharesync_migrate=$?
if [ "$office_migrate" = "0" ] && [ "$cloud_migrate" = "0" ] && [ "$sharesync_migrate" = "0" ]; then
InstallPages=""
else
local title=${PKG_STR_WIZARD_UPDATE_TITLE}
local description
local activate=${PKG_STR_WIZARD_INSTALL_ACTIVATE}
if [ "$office_migrate" = "0" ]; then
description=${PKG_STR_WIZARD_UPDATE_DESC_CLOUD}
else
if [ "$cloud_migrate" = "1" ] || [ "$sharesync_migrate" = "1" ]; then
description=${PKG_STR_WIZARD_UPDATE_DESC_CLOUD_OFFICE}
else
description=${PKG_STR_WIZARD_UPDATE_DESC_OFFICE}
fi
fi
if [ "$office_migrate" = "1" ]; then
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_OFFICE_MIGRATE__/true/g'`
else
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_OFFICE_MIGRATE__/false/g'`
fi
if [ "$cloud_migrate" = "1" ]; then
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_CLOUD_MIGRATE__/true/g'`
else
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_CLOUD_MIGRATE__/false/g'`
fi
if [ "$sharesync_migrate" = "1" ]; then
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_SHARESYNC_MIGRATE__/true/g'`
else
activate=`/usr/bin/echo $activate | /usr/bin/sed 's/__IS_SHARESYNC_MIGRATE__/false/g'`
fi
InstallPages=`/bin/cat<<EOF
{
"step_title": "${title}",
"activeate": "{${activate}}",
"items": [{
"desc": "${description}"
}]
}
EOF`
fi
/bin/cat > ${SYNOPKG_TEMP_LOGFILE} <<EOF
[${InstallPages}]
EOF
exit 0
}
main "$@"