Compare commits

..

84 Commits

Author SHA1 Message Date
f54ed462b1 Update shadowJar to new config format 2024-03-27 16:28:52 +01:00
7498dcf122 Merge pull request 'Update dependency org.yaml:snakeyaml to v2' (#37) from renovate/org.yaml-snakeyaml-2.x into master
Reviewed-on: #37
2024-03-27 14:28:16 +00:00
7e5665a56f Merge pull request 'Update dependency org.slf4j:slf4j-simple to v2' (#36) from renovate/major-slf4j-monorepo into master
Reviewed-on: #36
2024-03-27 14:28:05 +00:00
f633e9d256 Merge pull request 'Update dependency org.mariadb.jdbc:mariadb-java-client to v3' (#35) from renovate/org.mariadb.jdbc-mariadb-java-client-3.x into master
Reviewed-on: #35
2024-03-27 14:27:56 +00:00
bdfe4a00a9 Merge pull request 'Update dependency org.apache.directory.api:api-all to v2' (#34) from renovate/org.apache.directory.api-api-all-2.x into master
Reviewed-on: #34
2024-03-27 14:27:48 +00:00
50d4f0fa30 Update dependency org.yaml:snakeyaml to v2 2024-03-27 14:01:31 +00:00
bb190230b2 Update dependency org.slf4j:slf4j-simple to v2 2024-03-27 14:01:29 +00:00
c9bafd9af2 Update ma1sd to mxids 2024-03-27 14:10:04 +01:00
3c9c8ca1b5 Update dependency org.mariadb.jdbc:mariadb-java-client to v3 2024-03-27 13:01:32 +00:00
dacf96140c Update dependency org.apache.directory.api:api-all to v2 2024-03-27 13:01:30 +00:00
1d228d75e6 Update .github/workflows/codeql-analysis.yml.disabled 2024-03-27 12:39:33 +00:00
62530eda08 Update .github/workflows/codeql-analysis.disable 2024-03-27 12:39:21 +00:00
15c3e6b425 Update .github/workflows/codeql-analysis.disable.yml
Some checks failed
CodeQL / Analyze (java) (push) Failing after 31s
2024-03-27 12:38:58 +00:00
945a2dbdf5 Merge pull request 'Update dependency gradle to v8' (#33) from renovate/gradle-8.x into master
Some checks failed
CodeQL / Analyze (java) (push) Failing after 28s
Reviewed-on: #33
2024-03-27 12:33:46 +00:00
d5cebf103d Merge pull request 'Update dependency dnsjava:dnsjava to v3' (#32) from renovate/dnsjava-dnsjava-3.x into master
Some checks failed
CodeQL / Analyze (java) (push) Has been cancelled
Reviewed-on: #32
2024-03-27 12:33:26 +00:00
de14f80a40 Merge pull request 'Update dependency com.unboundid:unboundid-ldapsdk to v7' (#31) from renovate/com.unboundid-unboundid-ldapsdk-7.x into master
Some checks failed
CodeQL / Analyze (java) (push) Has been cancelled
Reviewed-on: #31
2024-03-27 12:33:12 +00:00
7ed6db537d Update codeql api version
Some checks failed
CodeQL / Analyze (java) (push) Failing after 1m33s
2024-03-27 12:28:02 +00:00
9d8d88527c Update .github/workflows/codeql-analysis.yml
Some checks failed
CodeQL / Analyze (java) (push) Failing after 33s
2024-03-27 12:26:01 +00:00
a1c82878f2 Update dependency gradle to v8
Some checks failed
CodeQL / Analyze (java) (pull_request) Failing after 21s
2024-03-27 12:02:36 +00:00
ab95c8ee32 Update dependency dnsjava:dnsjava to v3
Some checks failed
CodeQL / Analyze (java) (pull_request) Failing after 20s
2024-03-27 12:02:04 +00:00
e50a49b198 Update dependency com.unboundid:unboundid-ldapsdk to v7
Some checks failed
CodeQL / Analyze (java) (pull_request) Failing after 20s
2024-03-27 12:02:04 +00:00
4492888557 Merge pull request 'Update dependency com.twilio.sdk:twilio to v10' (#30) from renovate/com.twilio.sdk-twilio-10.x into master
Reviewed-on: #30
2024-03-27 11:52:25 +00:00
ed5407fc42 Merge pull request 'Update dependency com.sendgrid:sendgrid-java to v4' (#29) from renovate/com.sendgrid-sendgrid-java-4.x into master
Reviewed-on: #29
2024-03-27 11:52:16 +00:00
a2911f2ace Merge pull request 'Update dependency com.j256.ormlite:ormlite-jdbc to v6' (#28) from renovate/com.j256.ormlite-ormlite-jdbc-6.x into master
Reviewed-on: #28
2024-03-27 11:52:03 +00:00
e99578d168 Merge pull request 'Update dependency com.icegreen:greenmail to v2' (#27) from renovate/com.icegreen-greenmail-2.x into master
Reviewed-on: #27
2024-03-27 11:51:53 +00:00
d471ea71d7 Merge pull request 'Update dependency com.google.firebase:firebase-admin to v9' (#26) from renovate/com.google.firebase-firebase-admin-9.x into master
Reviewed-on: #26
2024-03-27 11:51:42 +00:00
56115df282 Merge pull request 'Update dependency com.github.tomakehurst:wiremock to v3' (#25) from renovate/com.github.tomakehurst-wiremock-3.x into master
Reviewed-on: #25
2024-03-27 11:51:27 +00:00
2e1194d216 Merge pull request 'Update dependency org.yaml:snakeyaml to v1.33' (#24) from renovate/org.yaml-snakeyaml-1.x into master
Reviewed-on: #24
2024-03-27 11:51:18 +00:00
ee001d543c Merge pull request 'Update dependency org.apache.commons:commons-lang3 to v3.14.0' (#21) from renovate/org.apache.commons-commons-lang3-3.x into master
Reviewed-on: #21
2024-03-27 11:51:06 +00:00
a826eb319e Merge pull request 'Update dependency commons-codec:commons-codec to v1.16.1' (#17) from renovate/commons-codec-commons-codec-1.x into master
Reviewed-on: #17
2024-03-27 11:50:56 +00:00
6b557e9954 Update dependency com.twilio.sdk:twilio to v10 2024-03-27 10:02:03 +00:00
041a4d1b73 Update dependency com.sendgrid:sendgrid-java to v4 2024-03-27 09:02:08 +00:00
c1a1741bfb Update dependency com.j256.ormlite:ormlite-jdbc to v6 2024-03-27 09:02:07 +00:00
6e1058c484 Update dependency com.icegreen:greenmail to v2 2024-03-27 08:02:04 +00:00
5f6fb38485 Update dependency com.google.firebase:firebase-admin to v9 2024-03-27 08:02:03 +00:00
c9046ffbd0 Update dependency com.github.tomakehurst:wiremock to v3 2024-03-27 07:02:17 +00:00
cf97c5a88f Update dependency org.yaml:snakeyaml to v1.33 2024-03-27 07:02:15 +00:00
3d1a8c4495 Update dependency org.apache.commons:commons-lang3 to v3.14.0 2024-03-27 07:02:14 +00:00
46dc07ef07 Update dependency commons-codec:commons-codec to v1.16.1 2024-03-27 07:02:13 +00:00
d9ab2b8739 Merge pull request 'Update dependency org.xerial:sqlite-jdbc to v3.45.2.0' (#23) from renovate/org.xerial-sqlite-jdbc-3.x into master
Reviewed-on: #23
2024-03-27 06:10:34 +00:00
14032aaf50 Merge pull request 'Update dependency org.postgresql:postgresql to v42.7.3' (#22) from renovate/org.postgresql-postgresql-42.x into master
Reviewed-on: #22
2024-03-27 06:10:23 +00:00
73051c3d00 Merge pull request 'Update dependency io.undertow:undertow-core to v2.3.12.Final' (#20) from renovate/io.undertow-undertow-core-2.x into master
Reviewed-on: #20
2024-03-27 06:10:04 +00:00
a3c8c4a8cf Merge pull request 'Update dependency gradle to v7.6.4' (#19) from renovate/gradle-7.x into master
Reviewed-on: #19
2024-03-27 06:09:47 +00:00
453751a39e Merge pull request 'Update dependency commons-io:commons-io to v2.15.1' (#18) from renovate/commons-io-commons-io-2.x into master
Reviewed-on: #18
2024-03-27 06:09:06 +00:00
ad23e91ece Merge pull request 'Update dependency commons-cli:commons-cli to v1.6.0' (#16) from renovate/commons-cli-commons-cli-1.x into master
Reviewed-on: #16
2024-03-27 06:08:42 +00:00
baabdfc2ef Merge pull request 'Update dependency com.twilio.sdk:twilio to v7.55.3' (#15) from renovate/com.twilio.sdk-twilio-7.x into master
Reviewed-on: #15
2024-03-27 06:08:20 +00:00
263e3260c9 Merge pull request 'Update dependency com.squareup.okhttp3:okhttp to v4.12.0' (#14) from renovate/okhttp-monorepo into master
Reviewed-on: #14
2024-03-27 06:08:10 +00:00
a281bdbf77 Update dependency org.xerial:sqlite-jdbc to v3.45.2.0 2024-03-26 22:02:15 +00:00
338e7f4aa2 Update dependency org.postgresql:postgresql to v42.7.3 2024-03-26 22:02:13 +00:00
a9212ce73a Update dependency io.undertow:undertow-core to v2.3.12.Final 2024-03-26 21:02:09 +00:00
f2e1fcb25f Update dependency gradle to v7.6.4 2024-03-26 20:02:39 +00:00
f5630bc4d9 Update dependency commons-io:commons-io to v2.15.1 2024-03-26 20:02:09 +00:00
dbccaecfd6 Update dependency commons-cli:commons-cli to v1.6.0 2024-03-26 19:02:15 +00:00
de0842d3a8 Update dependency com.twilio.sdk:twilio to v7.55.3 2024-03-26 18:02:10 +00:00
05424f14b8 Update dependency com.squareup.okhttp3:okhttp to v4.12.0 2024-03-26 18:02:08 +00:00
2587e6be7c Merge pull request 'Update dependency com.mchange:c3p0 to v0.10.0' (#13) from renovate/com.mchange-c3p0-0.x into master
Reviewed-on: #13
2024-03-26 17:39:03 +00:00
20062fe5bc Merge pull request 'Update dependency com.kohlschutter.junixsocket:junixsocket-core to v2.9.0' (#12) from renovate/com.kohlschutter.junixsocket-junixsocket-core-2.x into master
Reviewed-on: #12
2024-03-26 17:38:51 +00:00
0ec6462ff4 Update dependency com.mchange:c3p0 to v0.10.0 2024-03-26 17:02:16 +00:00
567c7bb972 Update dependency com.kohlschutter.junixsocket:junixsocket-core to v2.9.0 2024-03-26 17:02:14 +00:00
1c6322f1c2 Merge pull request 'Update dependency com.j256.ormlite:ormlite-jdbc to v5.7' (#11) from renovate/com.j256.ormlite-ormlite-jdbc-5.x into master
Reviewed-on: #11
2024-03-26 16:05:03 +00:00
603cdd1340 Merge pull request 'Update dependency com.icegreen:greenmail to v1.6.15' (#10) from renovate/com.icegreen-greenmail-1.x into master
Reviewed-on: #10
2024-03-26 16:04:50 +00:00
a6164379c5 Update dependency com.j256.ormlite:ormlite-jdbc to v5.7 2024-03-26 16:02:05 +00:00
fc9d6b3a36 Update dependency com.icegreen:greenmail to v1.6.15 2024-03-26 16:02:03 +00:00
8b14664dc7 Merge pull request 'Update dependency com.googlecode.libphonenumber:libphonenumber to v8.13.33' (#9) from renovate/com.googlecode.libphonenumber-libphonenumber-8.x into master
Reviewed-on: #9
2024-03-26 15:18:14 +00:00
f0922d67df Merge pull request 'Update dependency com.google.firebase:firebase-admin to v5.11.0' (#8) from renovate/com.google.firebase-firebase-admin-5.x into master
Reviewed-on: #8
2024-03-26 15:18:02 +00:00
6e05b51fdc Update dependency com.googlecode.libphonenumber:libphonenumber to v8.13.33 2024-03-26 15:02:08 +00:00
0999ef6309 Update dependency com.google.firebase:firebase-admin to v5.11.0 2024-03-26 15:02:06 +00:00
cae00f4606 Merge pull request 'Update dependency com.github.ben-manes:gradle-versions-plugin to v0.51.0' (#7) from renovate/com.github.ben-manes-gradle-versions-plugin-0.x into master
Reviewed-on: #7
2024-03-26 14:15:58 +00:00
941ae697e7 Merge pull request 'Update openjdk Docker tag to v11.0.16-jre-slim' (#6) from renovate/openjdk-11.x into master
Reviewed-on: #6
2024-03-26 14:15:43 +00:00
fbf1ea8f5b Merge pull request 'Update dependency org.slf4j:slf4j-simple to v1.7.36' (#5) from renovate/slf4j-monorepo into master
Reviewed-on: #5
2024-03-26 14:15:25 +00:00
4eef3ac40d Merge pull request 'Update dependency org.mariadb.jdbc:mariadb-java-client to v2.7.12' (#4) from renovate/org.mariadb.jdbc-mariadb-java-client-2.x into master
Reviewed-on: #4
2024-03-26 14:15:06 +00:00
e6c90aa00f Update dependency com.github.ben-manes:gradle-versions-plugin to v0.51.0 2024-03-26 14:02:17 +00:00
ca306a3212 Update openjdk Docker tag to v11.0.16-jre-slim 2024-03-26 14:02:15 +00:00
e8864afe02 Update dependency org.slf4j:slf4j-simple to v1.7.36 2024-03-26 13:02:02 +00:00
f09ede8780 Update dependency org.mariadb.jdbc:mariadb-java-client to v2.7.12 2024-03-26 13:02:01 +00:00
98146d3468 Merge pull request 'Update dependency org.apache.httpcomponents:httpclient to v4.5.14' (#3) from renovate/org.apache.httpcomponents-httpclient-4.x into master
Reviewed-on: #3
2024-03-26 12:25:59 +00:00
5f64b72a91 Merge pull request 'Update dependency com.unboundid:unboundid-ldapsdk to v4.0.14' (#2) from renovate/com.unboundid-unboundid-ldapsdk-4.x into master
Reviewed-on: #2
2024-03-26 12:25:43 +00:00
acb2b5a37d Update ma1sd to mxids 2024-03-26 13:21:48 +01:00
9f9c48aaa7 Update dependency org.apache.httpcomponents:httpclient to v4.5.14 2024-03-26 12:21:43 +00:00
eb6e541e15 Update dependency com.unboundid:unboundid-ldapsdk to v4.0.14 2024-03-26 12:21:41 +00:00
e45ac5a78a Merge pull request 'Add renovate.json' (#1) from tomas.kracmar-add-renovatebot-support into master
Reviewed-on: #1
2024-03-14 09:06:29 +00:00
aebcb7b5e1 Add renovate.json 2024-03-14 09:06:12 +00:00
c45f95ce3f Merge pull request 'Upgrade to V3 API' (#1) from ext/v3_update into master
Reviewed-on: cqrenet/ma1sd#1
2024-03-11 08:51:06 +00:00
640fa8e9f1 Upgrade to V3 API 2024-03-11 09:50:09 +01:00
28 changed files with 156 additions and 143 deletions

View File

@@ -34,7 +34,7 @@ jobs:
with: with:
# We must fetch at least the immediate parents so that if this is # We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head. # a pull request then we can checkout the head.
fetch-depth: 2 fetch-depth: 0
# If this run was triggered by a pull request event, then checkout # If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit. # the head of the pull request instead of the merge commit.
@@ -43,7 +43,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl

4
.gitignore vendored
View File

@@ -7,8 +7,8 @@ out/
.idea/ .idea/
# Local dev config # Local dev config
/ma1sd.yaml /mxids.yaml
/application.yaml /application.yaml
# Local dev storage # Local dev storage
/ma1sd.db /mxids.db

View File

@@ -2,7 +2,7 @@ FROM --platform=$BUILDPLATFORM openjdk:8-jre-alpine AS builder
RUN apk update && apk add gradle git && rm -rf /var/lib/apk/* /var/cache/apk/* RUN apk update && apk add gradle git && rm -rf /var/lib/apk/* /var/cache/apk/*
WORKDIR /ma1sd WORKDIR /mxids
COPY . . COPY . .
RUN ./gradlew shadowJar RUN ./gradlew shadowJar
@@ -10,17 +10,17 @@ FROM openjdk:8-jre-alpine
RUN apk update && apk add bash && rm -rf /var/lib/apk/* /var/cache/apk/* RUN apk update && apk add bash && rm -rf /var/lib/apk/* /var/cache/apk/*
VOLUME /etc/ma1sd VOLUME /etc/mxids
VOLUME /var/ma1sd VOLUME /var/mxids
EXPOSE 8090 EXPOSE 8090
ENV JAVA_OPTS="" ENV JAVA_OPTS=""
ENV CONF_FILE_PATH="/etc/ma1sd/ma1sd.yaml" ENV CONF_FILE_PATH="/etc/mxids/mxids.yaml"
ENV SIGN_KEY_PATH="/var/ma1sd/sign.key" ENV SIGN_KEY_PATH="/var/mxids/sign.key"
ENV SQLITE_DATABASE_PATH="/var/ma1sd/ma1sd.db" ENV SQLITE_DATABASE_PATH="/var/mxids/mxids.db"
CMD [ "/start.sh" ] CMD [ "/start.sh" ]
ADD src/docker/start.sh /start.sh ADD src/docker/start.sh /start.sh
ADD src/script/ma1sd /app/ma1sd ADD src/script/mxids /app/mxids
COPY --from=builder /ma1sd/build/libs/ma1sd.jar /app/ma1sd.jar COPY --from=builder /mxids/build/libs/mxids.jar /app/mxids.jar

View File

@@ -1,16 +1,16 @@
FROM --platform=$BUILDPLATFORM openjdk:11.0.7-jre-slim FROM --platform=$BUILDPLATFORM openjdk:11.0.16-jre-slim
VOLUME /etc/ma1sd VOLUME /etc/mxids
VOLUME /var/ma1sd VOLUME /var/mxids
EXPOSE 8090 EXPOSE 8090
ENV JAVA_OPTS="" ENV JAVA_OPTS=""
ENV CONF_FILE_PATH="/etc/ma1sd/ma1sd.yaml" ENV CONF_FILE_PATH="/etc/mxids/mxids.yaml"
ENV SIGN_KEY_PATH="/var/ma1sd/sign.key" ENV SIGN_KEY_PATH="/var/mxids/sign.key"
ENV SQLITE_DATABASE_PATH="/var/ma1sd/ma1sd.db" ENV SQLITE_DATABASE_PATH="/var/mxids/mxids.db"
CMD [ "/start.sh" ] CMD [ "/start.sh" ]
ADD src/docker/start.sh /start.sh ADD src/docker/start.sh /start.sh
ADD src/script/ma1sd /app/ma1sd ADD src/script/mxids /app/mxids
ADD build/libs/ma1sd.jar /app/ma1sd.jar ADD build/libs/mxids.jar /app/mxids.jar

View File

@@ -1,5 +1,5 @@
/* /*
* ma1sd - Matrix Identity Server Daemon * mxids - Matrix Identity Server
* Copyright (C) 2017 Kamax Sarl * Copyright (C) 2017 Kamax Sarl
* *
* https://www.kamax.io/ * https://www.kamax.io/
@@ -26,16 +26,16 @@ apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'com.github.ben-manes.versions' apply plugin: 'com.github.ben-manes.versions'
def confFileName = "ma1sd.example.yaml" def confFileName = "mxids.example.yaml"
def distDir = "${project.buildDir}/dist" def distDir = "${project.buildDir}/dist"
def debBinPath = "/usr/lib/ma1sd" def debBinPath = "/usr/lib/mxids"
def debConfPath = "/etc/ma1sd" def debConfPath = "/etc/mxids"
def debDataPath = "/var/lib/ma1sd" def debDataPath = "/var/lib/mxids"
def debSystemdPath = "/etc/systemd/system" def debSystemdPath = "/etc/systemd/system"
def debConfFileName = confFileName def debConfFileName = confFileName
def debStartScriptFilename = "ma1sd" def debStartScriptFilename = "mxids"
def debBuildBasePath = "${project.buildDir}/tmp/debian" def debBuildBasePath = "${project.buildDir}/tmp/debian"
def debBuildDebianPath = "${debBuildBasePath}/DEBIAN" def debBuildDebianPath = "${debBuildBasePath}/DEBIAN"
@@ -44,18 +44,18 @@ def debBuildConfPath = "${debBuildBasePath}${debConfPath}"
def debBuildDataPath = "${debBuildBasePath}${debDataPath}" def debBuildDataPath = "${debBuildBasePath}${debDataPath}"
def debBuildSystemdPath = "${debBuildBasePath}${debSystemdPath}" def debBuildSystemdPath = "${debBuildBasePath}${debSystemdPath}"
def dockerImageName = "ma1uta/ma1sd" def dockerImageName = "cqrenet/mxids"
def dockerImageTag = "${dockerImageName}:${ma1sdVersion()}" def dockerImageTag = "${dockerImageName}:${mxidsVersion()}"
group = 'io.kamax' group = 'io.kamax'
mainClassName = 'io.kamax.mxisd.MxisdStandaloneExec' mainClassName = 'io.kamax.mxisd.MxisdStandaloneExec'
sourceCompatibility = '1.8' sourceCompatibility = '1.8'
targetCompatibility = '1.8' targetCompatibility = '1.8'
String ma1sdVersion() { String mxidsVersion() {
def versionPattern = Pattern.compile("v(\\d+\\.)?(\\d+\\.)?(\\d+)(-.*)?") def versionPattern = Pattern.compile("v(\\d+\\.)?(\\d+\\.)?(\\d+)(-.*)?")
String version = System.getenv('MA1SD_BUILD_VERSION') String version = System.getenv('MXIDS_BUILD_VERSION')
if (version == null || version.size() == 0) { if (version == null || version.size() == 0) {
version = gitVersion() version = gitVersion()
} }
@@ -78,8 +78,8 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0' classpath 'com.github.johnrengelman:shadow:8.1.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.38.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.51.0'
} }
} }
@@ -89,97 +89,97 @@ repositories {
dependencies { dependencies {
// Logging // Logging
api 'org.slf4j:slf4j-simple:1.7.25' api 'org.slf4j:slf4j-simple:2.0.12'
// Easy file management // Easy file management
api 'commons-io:commons-io:2.8.0' api 'commons-io:commons-io:2.15.1'
// Config management // Config management
api 'org.yaml:snakeyaml:1.28' api 'org.yaml:snakeyaml:2.2'
// Dependencies from old Matrix-java-sdk // Dependencies from old Matrix-java-sdk
api 'org.apache.commons:commons-lang3:3.12.0' api 'org.apache.commons:commons-lang3:3.14.0'
api 'com.squareup.okhttp3:okhttp:4.2.2' api 'com.squareup.okhttp3:okhttp:4.12.0'
api 'commons-codec:commons-codec:1.15' api 'commons-codec:commons-codec:1.16.1'
// ORMLite // ORMLite
api 'com.j256.ormlite:ormlite-jdbc:5.3' api 'com.j256.ormlite:ormlite-jdbc:6.1'
// ed25519 handling // ed25519 handling
api 'net.i2p.crypto:eddsa:0.3.0' api 'net.i2p.crypto:eddsa:0.3.0'
// LDAP connector // LDAP connector
api 'org.apache.directory.api:api-all:1.0.3' api 'org.apache.directory.api:api-all:2.1.6'
// DNS lookups // DNS lookups
api 'dnsjava:dnsjava:2.1.9' api 'dnsjava:dnsjava:3.5.3'
// HTTP connections // HTTP connections
api 'org.apache.httpcomponents:httpclient:4.5.13' api 'org.apache.httpcomponents:httpclient:4.5.14'
// Phone numbers validation // Phone numbers validation
api 'com.googlecode.libphonenumber:libphonenumber:8.12.21' api 'com.googlecode.libphonenumber:libphonenumber:8.13.33'
// E-mail sending // E-mail sending
api 'javax.mail:javax.mail-api:1.6.2' api 'javax.mail:javax.mail-api:1.6.2'
api 'com.sun.mail:javax.mail:1.6.2' api 'com.sun.mail:javax.mail:1.6.2'
// Google Firebase Authentication backend // Google Firebase Authentication backend
api 'com.google.firebase:firebase-admin:5.3.0' api 'com.google.firebase:firebase-admin:9.2.0'
// Connection Pool // Connection Pool
api 'com.mchange:c3p0:0.9.5.5' api 'com.mchange:c3p0:0.10.0'
// SQLite // SQLite
api 'org.xerial:sqlite-jdbc:3.34.0' api 'org.xerial:sqlite-jdbc:3.45.2.0'
// PostgreSQL // PostgreSQL
api 'org.postgresql:postgresql:42.2.19' api 'org.postgresql:postgresql:42.7.3'
// MariaDB/MySQL // MariaDB/MySQL
api 'org.mariadb.jdbc:mariadb-java-client:2.7.2' api 'org.mariadb.jdbc:mariadb-java-client:3.3.3'
// UNIX sockets // UNIX sockets
api 'com.kohlschutter.junixsocket:junixsocket-core:2.3.3' api 'com.kohlschutter.junixsocket:junixsocket-core:2.9.0'
// Twilio SDK for SMS // Twilio SDK for SMS
api 'com.twilio.sdk:twilio:7.45.0' api 'com.twilio.sdk:twilio:10.1.2'
// SendGrid SDK to send emails from GCE // SendGrid SDK to send emails from GCE
api 'com.sendgrid:sendgrid-java:2.2.2' api 'com.sendgrid:sendgrid-java:4.10.2'
// ZT-Exec for exec identity store // ZT-Exec for exec identity store
api 'org.zeroturnaround:zt-exec:1.12' api 'org.zeroturnaround:zt-exec:1.12'
// HTTP server // HTTP server
api 'io.undertow:undertow-core:2.2.7.Final' api 'io.undertow:undertow-core:2.3.12.Final'
// Command parser for AS interface // Command parser for AS interface
api 'commons-cli:commons-cli:1.4' api 'commons-cli:commons-cli:1.6.0'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
testImplementation 'com.github.tomakehurst:wiremock:2.27.2' testImplementation 'com.github.tomakehurst:wiremock:3.0.1'
testImplementation 'com.unboundid:unboundid-ldapsdk:4.0.12' testImplementation 'com.unboundid:unboundid-ldapsdk:7.0.0'
testImplementation 'com.icegreen:greenmail:1.5.11' testImplementation 'com.icegreen:greenmail:2.0.1'
} }
jar { jar {
manifest { manifest {
attributes( attributes(
'Implementation-Version': ma1sdVersion() 'Implementation-Version': mxidsVersion()
) )
} }
} }
shadowJar { shadowJar {
baseName = project.name archiveBaseName.set(project.name)
classifier = null archiveClassifier.set('') // Set to an empty string if you don't need a classifier.
version = null archiveVersion.set('') // Set to an empty string if you don't want the version in the jar name.
} }
task debBuild(dependsOn: shadowJar) { task debBuild(dependsOn: shadowJar) {
doLast { doLast {
String debVersion = ma1sdVersion() String debVersion = mxidsVersion()
println "Version for package: ${debVersion}" println "Version for package: ${debVersion}"
mkdir distDir mkdir distDir
mkdir debBuildBasePath mkdir debBuildBasePath
@@ -190,7 +190,7 @@ task debBuild(dependsOn: shadowJar) {
mkdir debBuildSystemdPath mkdir debBuildSystemdPath
copy { copy {
from "${project.buildDir}/libs/ma1sd.jar" from "${project.buildDir}/libs/mxids.jar"
into debBuildBinPath into debBuildBinPath
} }
@@ -238,7 +238,7 @@ task debBuild(dependsOn: shadowJar) {
ant.replace( ant.replace(
file: "${debBuildDebianPath}/postinst", file: "${debBuildDebianPath}/postinst",
token: '%DEB_CONF_FILE%', token: '%DEB_CONF_FILE%',
value: "${debConfPath}/ma1sd.yaml" value: "${debConfPath}/mxids.yaml"
) )
ant.chmod( ant.chmod(
@@ -252,7 +252,7 @@ task debBuild(dependsOn: shadowJar) {
) )
copy { copy {
from "${project.file('src/systemd/ma1sd.service')}" from "${project.file('src/systemd/mxids.service')}"
into debBuildSystemdPath into debBuildSystemdPath
} }

View File

@@ -16,7 +16,7 @@ TCP 443
+<---------------------------------<+ +<---------------------------------<+
| |
| +-------------------+ | +-------------------+
TCP 8090 +-> | ma1sd | TCP 8090 +-> | mxids |
| | | |
| - Profile's 3PIDs | | - Profile's 3PIDs |
| - 3PID Invites | | - 3PID Invites |

View File

@@ -1,9 +1,11 @@
# From source # From source
- [From source](#from-source)
- [Binaries](#binaries) - [Binaries](#binaries)
- [Requirements](#requirements) - [Requirements](#requirements)
- [Build](#build) - [Build](#build)
- [Debian package](#debian-package) - [Debian package](#debian-package)
- [Docker image](#docker-image) - [Docker image](#docker-image)
- [Multi-platform builds](#multi-platform-builds)
- [Next steps](#next-steps) - [Next steps](#next-steps)
## Binaries ## Binaries
@@ -19,7 +21,7 @@ cd ma1sd
./gradlew build ./gradlew build
``` ```
Create a new configuration file by coping `ma1sd.example.yaml` to `ma1sd.yaml` and edit to your needs. Create a new configuration file by coping `mxids.example.yaml` to `mxids.yaml` and edit to your needs.
For advanced configuration, see the [Configure section](configure.md). For advanced configuration, see the [Configure section](configure.md).
Start the server in foreground to validate the build and configuration: Start the server in foreground to validate the build and configuration:

View File

@@ -1,5 +1,5 @@
#Thu Dec 05 22:39:36 MSK 2019 #Thu Dec 05 22:39:36 MSK 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -21,7 +21,7 @@
# #
matrix: matrix:
domain: '' domain: ''
v1: true # deprecated v1: false # deprecated
v2: true # MSC2140 API v2. Riot require enabled V2 API. v2: true # MSC2140 API v2. Riot require enabled V2 API.
@@ -32,11 +32,11 @@ matrix:
# /!\ THIS MUST **NOT** BE YOUR HOMESERVER KEYS FILE /!\ # /!\ THIS MUST **NOT** BE YOUR HOMESERVER KEYS FILE /!\
# If this path does not exist, it will be auto-generated. # If this path does not exist, it will be auto-generated.
# #
# During testing, /var/tmp/ma1sd/keys is a possible value # During testing, /var/tmp/mxids/keys is a possible value
# For production, recommended location shall be one of the following: # For production, recommended location shall be one of the following:
# - /var/lib/ma1sd/keys # - /var/lib/mxids/keys
# - /var/opt/ma1sd/keys # - /var/opt/mxids/keys
# - /var/local/ma1sd/keys # - /var/local/mxids/keys
# #
key: key:
path: '' path: ''
@@ -46,20 +46,20 @@ key:
# /!\ THIS MUST **NOT** BE YOUR HOMESERVER DATABASE /!\ # /!\ THIS MUST **NOT** BE YOUR HOMESERVER DATABASE /!\
# #
# Examples: # Examples:
# - /var/opt/ma1sd/store.db # - /var/opt/mxids/store.db
# - /var/local/ma1sd/store.db # - /var/local/mxids/store.db
# - /var/lib/ma1sd/store.db # - /var/lib/mxids/store.db
# #
storage: storage:
# backend: sqlite # or postgresql # backend: sqlite # or postgresql
provider: provider:
sqlite: sqlite:
database: '/path/to/ma1sd.db' database: '/path/to/mxids.db'
# postgresql: # postgresql:
# # Wrap all string values with quotes to avoid yaml parsing mistakes # # Wrap all string values with quotes to avoid yaml parsing mistakes
# database: '//localhost/ma1sd' # or full variant //192.168.1.100:5432/ma1sd_database # database: '//localhost/mxids' # or full variant //192.168.1.100:5432/mxids_database
# username: 'ma1sd_user' # username: 'mxids_user'
# password: 'ma1sd_password' # password: 'mxids_password'
# #
# # Pool configuration for postgresql backend. # # Pool configuration for postgresql backend.
# ####### # #######
@@ -190,10 +190,10 @@ threepid:
# terms: # terms:
# en: # lang # en: # lang
# name: term name en # localized name # name: term name en # localized name
# url: https://ma1sd.host.tld/term_en.html # localized url # url: https://mxids.host.tld/term_en.html # localized url
# fe: # lang # fe: # lang
# name: term name fr # localized name # name: term name fr # localized name
# url: https://ma1sd.host.tld/term_fr.html # localized url # url: https://mxids.host.tld/term_fr.html # localized url
# regexp: # regexp:
# - '/_matrix/identity/v2/account.*' # - '/_matrix/identity/v2/account.*'
# - '/_matrix/identity/v2/hash_details' # - '/_matrix/identity/v2/hash_details'

11
renovate.json Normal file
View File

@@ -0,0 +1,11 @@
{
"extends": [
"config:base"
],
"packageRules": [
{
"updateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
]
}

View File

@@ -1,6 +1,6 @@
Package: ma1sd Package: mxids
Maintainer: ma1uta <sablintolya@gmail.com> Maintainer: ma1uta <sablintolya@gmail.com>
Homepage: https://github.com/ma1uta/ma1sd Homepage: https://git.cqre.net/cqrenet/mxids.git
Description: Federated Matrix Identity Server Description: Federated Matrix Identity Server
Architecture: all Architecture: all
Section: net Section: net

View File

@@ -1,19 +1,19 @@
#!/bin/bash -e #!/bin/bash -e
# Add service account # Add service account
useradd -r ma1sd || true useradd -r mxids || true
# Set permissions for data directory # Set permissions for data directory
chown -R ma1sd:ma1sd %DEB_DATA_DIR% chown -R mxids:mxids %DEB_DATA_DIR%
# Create symlink to ma1sd run script # Create symlink to mxids run script
ln -sfT /usr/lib/ma1sd/ma1sd /usr/bin/ma1sd ln -sfT /usr/lib/mxids/mxids /usr/bin/mxids
# Enable systemd service # Enable systemd service
systemctl enable ma1sd.service systemctl enable mxids.service
# If we already have a config file setup, we attempt to run ma1sd automatically # If we already have a config file setup, we attempt to run mxids automatically
# Specifically targeted at upgrades where the service needs to be restarted # Specifically targeted at upgrades where the service needs to be restarted
if [ -f "%DEB_CONF_FILE%" ]; then if [ -f "%DEB_CONF_FILE%" ]; then
systemctl restart ma1sd.service systemctl restart mxids.service
fi fi

View File

@@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
# Stop running instance if needed # Stop running instance if needed
systemctl stop ma1sd.service systemctl stop mxids.service
# Disable service if exists # Disable service if exists
systemctl disable ma1sd.service systemctl disable mxids.service
# remove symlink # remove symlink
rm /usr/bin/ma1sd rm /usr/bin/mxids

View File

@@ -27,8 +27,8 @@ if [[ -n "$CONF_FILE_PATH" ]] && [ ! -f "$CONF_FILE_PATH" ]; then
echo >> "$CONF_FILE_PATH" echo >> "$CONF_FILE_PATH"
fi fi
echo "Starting ma1sd..." echo "Starting mxids..."
echo echo
fi fi
exec java -jar /app/ma1sd.jar -c /etc/ma1sd/ma1sd.yaml exec java -jar /app/mxids.jar -c /etc/mxids/mxids.yaml

View File

@@ -53,7 +53,7 @@ public class MatrixPath {
} }
public static MatrixPath clientR0() { public static MatrixPath clientR0() {
return client().add("r0"); return client().add("v3");
} }
private StringBuilder path = new StringBuilder(); private StringBuilder path = new StringBuilder();

View File

@@ -375,13 +375,13 @@ public abstract class AMatrixHttpClient implements _MatrixClientRaw {
} }
protected HttpUrl.Builder getClientPathBuilder(String... segments) { protected HttpUrl.Builder getClientPathBuilder(String... segments) {
String[] base = { "client", "r0" }; String[] base = { "client", "v3" };
segments = ArrayUtils.addAll(base, segments); segments = ArrayUtils.addAll(base, segments);
return getPathBuilder(segments); return getPathBuilder(segments);
} }
protected HttpUrl.Builder getMediaPathBuilder(String... segments) { protected HttpUrl.Builder getMediaPathBuilder(String... segments) {
String[] base = { "media", "r0" }; String[] base = { "media", "v3" };
segments = ArrayUtils.addAll(base, segments); segments = ArrayUtils.addAll(base, segments);
return getPathBuilder(segments); return getPathBuilder(segments);
} }

View File

@@ -36,7 +36,7 @@ public class MxisdStandaloneExec {
private static final Logger log = LoggerFactory.getLogger("App"); private static final Logger log = LoggerFactory.getLogger("App");
public static void main(String[] args) { public static void main(String[] args) {
String logLevel = System.getenv("MA1SD_LOG_LEVEL"); String logLevel = System.getenv("MXIDS_LOG_LEVEL");
if (StringUtils.isNotBlank(logLevel)) { if (StringUtils.isNotBlank(logLevel)) {
System.setProperty("org.slf4j.simpleLogger.log.io.kamax.mxisd", logLevel); System.setProperty("org.slf4j.simpleLogger.log.io.kamax.mxisd", logLevel);
} }
@@ -59,8 +59,8 @@ public class MxisdStandaloneExec {
System.out.println(" -c, --config Set the configuration file location"); System.out.println(" -c, --config Set the configuration file location");
System.out.println(" -v Increase log level (log more info)"); System.out.println(" -v Increase log level (log more info)");
System.out.println(" -vv Further increase log level"); System.out.println(" -vv Further increase log level");
System.out.println(" --dump Dump the full ma1sd configuration"); System.out.println(" --dump Dump the full mxids configuration");
System.out.println(" --dump-and-exit Dump the full ma1sd configuration and exit"); System.out.println(" --dump-and-exit Dump the full mxids configuration and exit");
System.out.println(" "); System.out.println(" ");
System.exit(0); System.exit(0);
return; return;
@@ -88,7 +88,7 @@ public class MxisdStandaloneExec {
} }
if (Objects.isNull(cfg)) { if (Objects.isNull(cfg)) {
cfg = YamlConfigLoader.tryLoadFromFile("ma1sd.yaml").orElseGet(MxisdConfig::new); cfg = YamlConfigLoader.tryLoadFromFile("mxids.yaml").orElseGet(MxisdConfig::new);
} }
if (dump) { if (dump) {
@@ -98,17 +98,17 @@ public class MxisdStandaloneExec {
} }
} }
log.info("ma1sd starting"); log.info("mxids starting");
log.info("Version: {}", Mxisd.Version); log.info("Version: {}", Mxisd.Version);
HttpMxisd mxisd = new HttpMxisd(cfg); HttpMxisd mxisd = new HttpMxisd(cfg);
Runtime.getRuntime().addShutdownHook(new Thread(() -> { Runtime.getRuntime().addShutdownHook(new Thread(() -> {
mxisd.stop(); mxisd.stop();
log.info("ma1sd stopped"); log.info("mxids stopped");
})); }));
mxisd.start(); mxisd.start();
log.info("ma1sd started"); log.info("mxids started");
} catch (ConfigurationException e) { } catch (ConfigurationException e) {
log.error(e.getDetailedMessage()); log.error(e.getDetailedMessage());
log.error(e.getMessage()); log.error(e.getMessage());

View File

@@ -33,8 +33,8 @@ public class RestBackendConfig {
public static class IdentityEndpoints { public static class IdentityEndpoints {
private String single = "/_ma1sd/backend/api/v1/identity/single"; private String single = "/_mxids/backend/api/v1/identity/single";
private String bulk = "/_ma1sd/backend/api/v1/identity/bulk"; private String bulk = "/_mxids/backend/api/v1/identity/bulk";
public String getSingle() { public String getSingle() {
return single; return single;
@@ -56,9 +56,9 @@ public class RestBackendConfig {
public static class ProfileEndpoints { public static class ProfileEndpoints {
private String displayName = "/_ma1sd/backend/api/v1/profile/displayName"; private String displayName = "/_mxids/backend/api/v1/profile/displayName";
private String threepids = "/_ma1sd/backend/api/v1/profile/threepids"; private String threepids = "/_mxids/backend/api/v1/profile/threepids";
private String roles = "/_ma1sd/backend/api/v1/profile/roles"; private String roles = "/_mxids/backend/api/v1/profile/roles";
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
@@ -88,8 +88,8 @@ public class RestBackendConfig {
public static class Endpoints { public static class Endpoints {
private String auth = "/_ma1sd/backend/api/v1/auth/login"; private String auth = "/_mxids/backend/api/v1/auth/login";
private String directory = "/_ma1sd/backend/api/v1/directory/user/search"; private String directory = "/_mxids/backend/api/v1/directory/user/search";
private IdentityEndpoints identity = new IdentityEndpoints(); private IdentityEndpoints identity = new IdentityEndpoints();
private ProfileEndpoints profile = new ProfileEndpoints(); private ProfileEndpoints profile = new ProfileEndpoints();

View File

@@ -1,8 +1,8 @@
/* /*
* ma1sd - Matrix Identity Server Daemon * mxids - Matrix Identity Server Daemon
* Copyright (C) 2020 Anatoliy SAblin * Copyright (C) 2020 Anatoliy SAblin
* *
* https://www.github.com/ma1uta/ma1sd/ * https://git.cqre.net/cqrenet/mxids/
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as * it under the terms of the GNU Affero General Public License as

View File

@@ -24,6 +24,6 @@ import io.kamax.mxisd.http.undertow.handler.BasicHttpHandler;
public abstract class LoginHandler extends BasicHttpHandler { public abstract class LoginHandler extends BasicHttpHandler {
public static final String Path = "/_matrix/client/r0/login"; public static final String Path = "/_matrix/client/v3/login";
} }

View File

@@ -31,7 +31,7 @@ import java.net.URI;
public class UserDirectorySearchHandler extends HomeserverProxyHandler { public class UserDirectorySearchHandler extends HomeserverProxyHandler {
public static final String Path = "/_matrix/client/r0/user_directory/search"; public static final String Path = "/_matrix/client/v3/user_directory/search";
private DirectoryManager mgr; private DirectoryManager mgr;

View File

@@ -10,7 +10,7 @@ import java.util.concurrent.Executors;
public class InternalInviteManagerHandler extends BasicHttpHandler { public class InternalInviteManagerHandler extends BasicHttpHandler {
public static final String PATH = "/_ma1sd/internal/admin/inv_manager"; public static final String PATH = "/_mxids/internal/admin/inv_manager";
private final InvitationManager invitationManager; private final InvitationManager invitationManager;
private final ExecutorService executors = Executors.newFixedThreadPool(1); private final ExecutorService executors = Executors.newFixedThreadPool(1);

View File

@@ -44,7 +44,7 @@ import java.util.Optional;
public class RoomInviteHandler extends BasicHttpHandler { public class RoomInviteHandler extends BasicHttpHandler {
public static final String Path = "/_matrix/client/r0/rooms/{roomId}/invite"; public static final String Path = "/_matrix/client/v3/rooms/{roomId}/invite";
private static final Logger log = LoggerFactory.getLogger(RoomInviteHandler.class); private static final Logger log = LoggerFactory.getLogger(RoomInviteHandler.class);
@@ -62,7 +62,7 @@ public class RoomInviteHandler extends BasicHttpHandler {
public void handleRequest(HttpServerExchange exchange) { public void handleRequest(HttpServerExchange exchange) {
String accessToken = getAccessToken(exchange); String accessToken = getAccessToken(exchange);
String whoamiUri = dns.transform(URI.create(exchange.getRequestURL()).resolve(URI.create("/_matrix/client/r0/account/whoami"))).toString(); String whoamiUri = dns.transform(URI.create(exchange.getRequestURL()).resolve(URI.create("/_matrix/client/v3/account/whoami"))).toString();
log.info("Who Am I URL: {}", whoamiUri); log.info("Who Am I URL: {}", whoamiUri);
HttpGet whoAmIReq = new HttpGet(whoamiUri); HttpGet whoAmIReq = new HttpGet(whoamiUri);
whoAmIReq.addHeader("Authorization", "Bearer " + accessToken); whoAmIReq.addHeader("Authorization", "Bearer " + accessToken);

View File

@@ -34,7 +34,7 @@ import java.util.Optional;
public class ProfileHandler extends HomeserverProxyHandler { public class ProfileHandler extends HomeserverProxyHandler {
public static final String UserID = "userId"; public static final String UserID = "userId";
public static final String Path = "/_matrix/client/r0/profile/{" + UserID + "}"; public static final String Path = "/_matrix/client/v3/profile/{" + UserID + "}";
protected ProfileManager mgr; protected ProfileManager mgr;

View File

@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
public class Register3pidRequestTokenHandler extends BasicHttpHandler { public class Register3pidRequestTokenHandler extends BasicHttpHandler {
public static final String Key = "medium"; public static final String Key = "medium";
public static final String Path = "/_matrix/client/r0/register/{" + Key + "}/requestToken"; public static final String Path = "/_matrix/client/v3/register/{" + Key + "}/requestToken";
private static final Logger log = LoggerFactory.getLogger(Register3pidRequestTokenHandler.class); private static final Logger log = LoggerFactory.getLogger(Register3pidRequestTokenHandler.class);

View File

@@ -2,7 +2,7 @@
############################################################################## ##############################################################################
## ##
## ma1sd start up script for UN*X ## mxids start up script for UN*X
## ##
############################################################################## ##############################################################################
@@ -21,10 +21,10 @@ while [ -h "$PRG" ] ; do
done done
APP_HOME=`dirname "$PRG"` APP_HOME=`dirname "$PRG"`
APP_NAME="ma1sd" APP_NAME="mxids"
APP_BASE_NAME=`basename "$0"` APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and MA1SD_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and MXIDS_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="" DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
@@ -61,7 +61,7 @@ case "`uname`" in
;; ;;
esac esac
CLASSPATH=$APP_HOME/ma1sd.jar CLASSPATH=$APP_HOME/mxids.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
@@ -158,7 +158,7 @@ for s in "${@}" ; do
done done
# Collect JVM options # Collect JVM options
JVM_OPTS=$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MA1SD_OPTS JVM_OPTS=$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MXIDS_OPTS
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then

View File

@@ -1,10 +0,0 @@
[Unit]
Description=ma1sd
After=syslog.target
[Service]
User=ma1sd
ExecStart=/usr/bin/ma1sd -c /etc/ma1sd/ma1sd.yaml
[Install]
WantedBy=multi-user.target

10
src/systemd/mxids.service Normal file
View File

@@ -0,0 +1,10 @@
[Unit]
Description=mxids
After=syslog.target
[Service]
User=mxids
ExecStart=/usr/bin/mxids -c /etc/mxids/mxids.yaml
[Install]
WantedBy=multi-user.target