Add Debian package support
This commit is contained in:
7
src/debian/control
Normal file
7
src/debian/control
Normal file
@@ -0,0 +1,7 @@
|
||||
Package: mxisd
|
||||
Maintainer: Kamax.io <foss@kamax.io>
|
||||
Homepage: https://github.com/kamax-io/mxisd
|
||||
Description: Federated Matrix Identity Server
|
||||
Architecture: all
|
||||
Depends: openjdk-8-jre | openjdk-8-jre-headless | openjdk-8-jdk | openjdk-8-jdk-headless
|
||||
Version: 0
|
||||
13
src/debian/postinst
Executable file
13
src/debian/postinst
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Add service account
|
||||
useradd -r mxisd || true
|
||||
|
||||
# Set permissions for data directory
|
||||
chown -R mxisd:mxisd %DEB_DATA_DIR%
|
||||
|
||||
# Create symlink to mxusd
|
||||
ln -sfT /usr/lib/mxisd/mxisd.jar /usr/bin/mxisd
|
||||
|
||||
# Enable systemd service
|
||||
systemctl enable mxisd.service
|
||||
10
src/debian/prerm
Normal file
10
src/debian/prerm
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop running instance if needed
|
||||
systemctl stop mxisd.service
|
||||
|
||||
# Disable service if exists
|
||||
systemctl disable mxisd.service
|
||||
|
||||
# remove symlink
|
||||
rm /usr/bin/mxisd
|
||||
Reference in New Issue
Block a user