Skip to content

Instantly share code, notes, and snippets.

View aitseitz's full-sized avatar
⚜️

Alexander Seitz aitseitz

⚜️
View GitHub Profile
@aitseitz
aitseitz / threaddump_script.sh
Last active September 29, 2023 16:24
ACS threaddump_script.sh
#!/bin/bash
# This Script creates threaddumps
# for Alfresco Content Service (ACS) and Alfresco Search Services (ASS)
# in specified log directory
# Script could be used in a cronjob, therefore a delete option for old
# threaddumps is implemented
# Variables:
JAVA_HOME="/opt/java/current"
LOG_DIR="/opt/alfresco/logs"
@aitseitz
aitseitz / add-menuitem.sh
Last active January 21, 2022 13:58
add-menuitem.sh - Generate Linux Mint Startmenu entry with Icon
#!/bin/bash
# This script generates an linux (mint) startmenu entry with an icon for your application
# v.1.0
# @author: Alexander Seitz
# Resolve the location of the installation.
# This includes resolving any symlinks.
PRG=$0
while [ -h "${PRG}" ]; do
ls=`ls -ld "${PRG}"`
@aitseitz
aitseitz / generateFaviconFromSVG.sh
Last active December 21, 2021 16:41
generateFaviconFromSVG.sh
#!/bin/bash
# Sources:
# https://github.com/audreyr/favicon-cheat-sheet
# https://graphicdesign.stackexchange.com/questions/77359/how-to-convert-a-square-svg-to-all-size-ico
set -ex
svg=$1
size=(16 24 32 48 64 76 96 128 144 152 196)
@aitseitz
aitseitz / reset_alf_auth_script.sql
Created November 9, 2021 14:20 — forked from AFaust/reset_alf_auth_script.sql
Reset Alfresco Authorised Users tracking (only meant for fixing errors, i.e. MNT-16663, or false-positive 'manual changes' detection - not to circumvent subscription terms)
-- clear all user license states
delete from alf_auth_status;
-- remove old checksum and keystore
-- ns_id = 1 should always be the system model, store_id = 2 always the system store
delete from alf_node_properties where qname_id in (
select id from alf_qname where ns_id = 1 and local_name in ('keyStore', 'authorizationChecksum')
) and node_id in (
select id from alf_node where store_id = 2
);
SELECT count(*),round(SUM(u.content_size)/1024/1024, 3) AS "Size (MB)", to_char(n.audit_created:: date,'yyyy') as yyyy_
FROM alf_node AS n,
alf_node_properties AS p,
alf_node_properties AS p1,
alf_namespace AS ns,
alf_qname AS q,
alf_content_data AS d,
alf_content_url AS u
WHERE n.id=p.node_id
AND ns.id=q.ns_id
@aitseitz
aitseitz / catalina.log
Last active January 16, 2025 13:05
ACS "consider increasing the maximum size of the cache"
INFO [localhost-startStop-1] [catalina.startup.HostConfig] Deploying deployment descriptor [/opt/content-services/tomcat/conf/Catalina/localhost/share.xml]
...
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum si
@aitseitz
aitseitz / drop_acs_public_schema_without_create_permissions.sql
Last active September 29, 2023 16:31
ACS - Cleanup Alfresco Database
-- PostgreSQL Script to delete ACS Database in case we do not have permissions to drop and create database
-- drop tables in 'public' schema
-- but do not delete sfc table!
DO $$
DECLARE
r RECORD;
BEGIN
FOR r IN (select 'drop table if exists"' || tablename || '" cascade;' AS drop_statement from pg_tables WHERE schemaname = 'public' AND tablename != 'sfc') LOOP
@aitseitz
aitseitz / acs_downgrade_amp_module.js
Last active March 12, 2024 10:51
ACS: How to downgrade an AMP-Module like alfresco-aos-module
// Based on Tech Article:
// https://community.hyland.com/tskb/000013140-how-to-downgrade-the-outlook-integration-module-after-installing-unsupported-amp-version
// the correct uuid for the amp module needs to be identified via the node browser inside the system://system Store
var sysNodeUUID = "system://system/8b6df670-9bb3-462b-8483-9b156e2621fd";
var newVersionString = "1.0.0";
/**
* Searches for the target node and sets a fix Version for "module:currentVersion"
* @param sysNodeUUID {String} module node string e.g. "system://system/uuid"
@aitseitz
aitseitz / acs_pwd_md4_hash.py
Last active September 29, 2023 16:37
ACS Change Alfresco Admin Password
#!/usr/bin/python3
import hashlib
import sys
import getpass
print("*************************************************************")
print("* Generate md4 password hash for alfresco content services *")
print("*************************************************************")
# https://docs.python.org/3.8/library/getpass.html