Rename config file, parameters, application name, package.

This commit is contained in:
Anatoly Sablin
2019-07-11 22:26:20 +03:00
parent c3262a9f25
commit e6fec9199d
41 changed files with 263 additions and 263 deletions

View File

@@ -1,4 +1,4 @@
Package: mxisd
Package: ma1sd
Maintainer: ma1uta <sablintolya@gmail.com>
Homepage: https://github.com/ma1uta/ma1sd
Description: Federated Matrix Identity Server

View File

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

View File

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

View File

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

View File

@@ -36,7 +36,7 @@ public class MxisdStandaloneExec {
private static final Logger log = LoggerFactory.getLogger("App");
public static void main(String[] args) {
String logLevel = System.getenv("MXISD_LOG_LEVEL");
String logLevel = System.getenv("MA1SD_LOG_LEVEL");
if (StringUtils.isNotBlank(logLevel)) {
System.setProperty("org.slf4j.simpleLogger.log.io.kamax.mxisd", logLevel);
}

View File

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

View File

@@ -2,7 +2,7 @@
##############################################################################
##
## mxisd start up script for UN*X
## ma1sd start up script for UN*X
##
##############################################################################
@@ -21,10 +21,10 @@ while [ -h "$PRG" ] ; do
done
APP_HOME=`dirname "$PRG"`
APP_NAME="mxisd"
APP_NAME="ma1sd"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and MXISD_OPTS to pass JVM options to this script.
# Add default JVM options here. You can also use JAVA_OPTS and MA1SD_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
@@ -61,7 +61,7 @@ case "`uname`" in
;;
esac
CLASSPATH=$APP_HOME/mxisd.jar
CLASSPATH=$APP_HOME/ma1sd.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
@@ -158,7 +158,7 @@ for s in "${@}" ; do
done
# Collect JVM options
JVM_OPTS=$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MXISD_OPTS
JVM_OPTS=$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$MA1SD_OPTS
# 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

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

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

View File

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