Skip to content

Commit

Permalink
Miscellaneous fixes
Browse files Browse the repository at this point in the history
- Add variable for synoservice
- Simplify DSM 6 permissions
- Fix mysql default socket in DSM 6
- Add PHP extension zlib
- Amend uninstall wizard text
  • Loading branch information
mreid-tt committed Jan 29, 2024
1 parent c2f5bb3 commit e18dcd3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion spk/fengoffice/src/conf/resource
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"mysqli",
"pdo_mysql",
"xmlrpc",
"zip"
"zip",
"zlib"
],
"group": "http",
"profile_desc": "PHP Profile for fengoffice",
Expand Down
14 changes: 6 additions & 8 deletions spk/fengoffice/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ else
WEB_GROUP="http"
fi
WEB_ROOT="${WEB_DIR}/${SYNOPKG_PKGNAME}"
SYNOSVC="/usr/syno/sbin/synoservice"

service_prestart ()
{
Expand Down Expand Up @@ -140,6 +141,11 @@ service_postinst ()
${RM} ${TEMPDIR}
fi

# Fix permissions
if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}
fi

# Run installer
if [ "${SYNOPKG_PKG_STATUS}" = "INSTALL" ]; then
# Define the resource file
Expand Down Expand Up @@ -170,14 +176,6 @@ script_installer_storage[database_type]=mysqli\
$COMMAND > /dev/null 2>&1
fi
fi

# Fix permissions
if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}/config
chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}/cache
chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}/upload
chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}/tmp
fi
}

service_preuninst ()
Expand Down
7 changes: 5 additions & 2 deletions spk/fengoffice/src/web/fengoffice.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"mysqli",
"pdo_mysql",
"xmlrpc",
"zip"
"zip",
"zlib"
],
"fpm_settings": {
"max_children": 20,
Expand All @@ -23,7 +24,9 @@
"start_servers": 2
},
"open_basedir": "",
"php_settings": {},
"php_settings": {
"mysqli.default_socket": "/run/mysqld/mysqld10.sock"
},
"profile_desc": "PHP Profile for fengoffice",
"profile_name": "fengoffice Profile"
}
2 changes: 1 addition & 1 deletion spk/fengoffice/src/wizard/uninstall_uifile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ PAGE_UNINSTALL_CONFIG=$(/bin/cat<<EOF
}]
}, {
"type": "textfield",
"desc": "Optional: Provide directory for database export. Leave blank to skip export. The directory will be created if it does not exist",
"desc": "Optional: Provide directory for database export. Ensure that the user 'sc-fengoffice' has write permissions to that directory. Leave blank to skip export.",
"subitems": [{
"key": "wizard_dbexport_path",
"desc": "Database export location",
Expand Down

0 comments on commit e18dcd3

Please sign in to comment.