Restart mxisd service on Debian package upgrade/install if possible
This commit is contained in:
@@ -229,6 +229,12 @@ task debBuild(dependsOn: shadowJar) {
|
|||||||
value: debDataPath
|
value: debDataPath
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ant.replace(
|
||||||
|
file: "${debBuildDebianPath}/postinst",
|
||||||
|
token: '%DEB_CONF_FILE%',
|
||||||
|
value: "${debConfPath}/mxisd.yaml"
|
||||||
|
)
|
||||||
|
|
||||||
ant.chmod(
|
ant.chmod(
|
||||||
file: "${debBuildDebianPath}/postinst",
|
file: "${debBuildDebianPath}/postinst",
|
||||||
perm: 'a+x'
|
perm: 'a+x'
|
||||||
|
@@ -11,3 +11,9 @@ ln -sfT /usr/lib/mxisd/mxisd /usr/bin/mxisd
|
|||||||
|
|
||||||
# Enable systemd service
|
# Enable systemd service
|
||||||
systemctl enable mxisd.service
|
systemctl enable mxisd.service
|
||||||
|
|
||||||
|
# If we already have a config file setup, we attempt to run mxisd automatically
|
||||||
|
# Specifically targeted at upgrades where the service needs to be restarted
|
||||||
|
if [ -f "%DEB_CONF_FILE%" ]; then
|
||||||
|
systemctl restart mxisd.service
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user