| 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
# Copyright (c) 2020 Synology Inc. All rights reserved.
OFFICE_REPO_PATH=$(/bin/get_key_value /usr/syno/etc/packages/SynologyDrive/db-path.conf db-vol)/@SynoDrive/office
FILES_TO_REMOVE=("Soubory aplikace Synology Office (pokud existují)" "Nastavení sdílení souborů" "Hvězdičky a popisky" "Historie verzí" "Soubory v koši")
files_to_remove_list=""
if [ ${#FILES_TO_REMOVE[@]} -ne 0 ]; then
for file in "${FILES_TO_REMOVE[@]}"; do
files_to_remove_list+="<li>$file</li>"
done
fi
read -r -d '' UNINSTALL_WITHOUT_OFFICE <<EOF
[{
"step_title": "Odebrat data a nastavení služby Synology Drive Server",
"items": [{
"desc": "pkgmgr:uninstall_wizard_page_description"
},{
"desc": "<ul class=\"synopkg-ul-list\">$files_to_remove_list</ul>"
},{
"type": "multiselect",
"subitems": [{
"key": "pkgwizard_remove_cstn_db",
"desc": "pkgmgr:uninstall_wizard_confirm_description"
}]
}]
}]
EOF
read -r -d '' UNINSTALL_WITH_OFFICE <<EOF
[{
"step_title": "Odebrat data a nastavení služby Synology Drive Server",
"items": [{
"desc": "pkgmgr:uninstall_wizard_page_description"
},{
"desc": "<ul class=\"synopkg-ul-list\">$files_to_remove_list</ul>"
},{
"type": "multiselect",
"subitems": [{
"key": "pkgwizard_remove_cstn_db",
"desc": "pkgmgr:uninstall_wizard_confirm_description"
}]
}],
"activeate": "{Ext.define('SYNO.SDS.Drive.Wizard.ConfirmDialog',{extend:'SYNO.SDS.ModalWindow',constructor:function(cfg){SYNO.Assert(cfg.confirmText,'need confirmText');SYNO.Assert(cfg.checkboxText,'need checkboxText');var config={cls:'x-window-dlg',resizable:false,minimizable:false,maximizable:false,closable:false,stateful:false,dsmStyle:'v5',maxWidth:600,minWidth:300,autoHeight:true,header:false,draggable:false,buttonAlign:'right',elements:'body',padding:'20px 20px 0 20px',footer:true,fbar:new Ext.Toolbar({enableOverflow:false,items:[{xtype:'syno_button',btnStyle:'grey',text:cfg.cancelText||_T('common','no'),handler:this.onCancel,scope:this},this.applyBtn=new SYNO.ux.Button({btnStyle:'red',text:cfg.closeText||_T('common','yes'),disabled:true,handler:this.onApply,scope:this})]}),items:[{xtype:'syno_displayfield',hideLabel:true,value:cfg.confirmText},{xtype:'syno_checkbox',name:'understand',cls:'close-confirm-warning',boxLabel:cfg.checkboxText,listeners:{scope:this,check:this._onUpdateUnderstand,afterrender:this._onAfterCheckboxRender}}]};this.callParent([Ext.apply(config,cfg)])},_onAfterCheckboxRender:function(checkbox){checkbox.el.parent().select('.syno-ux-checkbox-label').addClass('red-status')},_onUpdateUnderstand:function(checkbox,check){this.setEnableApplyBtn(check)},setEnableApplyBtn:function(enable){this.applyBtn[enable?'enable':'disable']()},onApply:function(){this.fireEvent('apply');this.close()},onCancel:function(){this.fireEvent('cancel');this.close()}});var displayConfirmMessage=function(checkbox,checked){if(!checked){return}var win=new SYNO.SDS.Drive.Wizard.ConfirmDialog({owner:checkbox.findWindow(),confirmText:'Soubory sady Synology Office, které nebyly otevřeny a uloženy pomocí sady Synology Office verze 3.2 nebo vyšší, budou po odebrání databáze služby Synology Drive Server odstraněny. Chcete pokračovat?',checkboxText:'Rozumím, že tato akce může způsobit odebrání některých souborů sady Synology Office.',width:450});win.open();win.on('cancel',function(){checkbox.setValue(false)})};var panel=arguments[1];panel.items.items[panel.items.items.length-1].items.map['pkgwizard_remove_cstn_db'].on('check',displayConfirmMessage);}"
}]
EOF
IsOfficeInstalled()
{
if [ ! -d ${OFFICE_REPO_PATH} ]; then
return 0
fi
local office_repo_count=$(ls -l ${OFFICE_REPO_PATH} | wc -l)
if [ "${office_repo_count}" = "1" ]; then
return 0
fi
return 1
}
IsOfficeInstalled
office_installed=$?
if [ "$office_installed" = "1" ]; then
uninstallPage="${UNINSTALL_WITH_OFFICE}"
else
uninstallPage="${UNINSTALL_WITHOUT_OFFICE}"
fi
/bin/echo "${uninstallPage}" > ${SYNOPKG_TEMP_LOGFILE}
exit 0