-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jans-linux-setup): keycloak scheduler service (#8425)
* feat(jans-linux-setup): keycloak scheduler service Signed-off-by: Mustafa Baser <mbaser@mail.com> * feat(jans-linux-setup): set email for kc jans user Signed-off-by: Mustafa Baser <mbaser@mail.com> * fix(jans-linux-setup): copy kc-jans-scheduler.jar to lib dir Signed-off-by: Mustafa Baser <mbaser@mail.com> * feat(jans-linux-setup): remove kc-jans-scheduler upon uninstall Signed-off-by: Mustafa Baser <mbaser@mail.com> * chore(jans-linux-setup): extract kc-scheduler config files from main repository Signed-off-by: Mustafa Baser <mbaser@mail.com> * chore(jans-linux-setup): verbose file extraction from zip Signed-off-by: Mustafa Baser <mbaser@mail.com> * fix(jans-linux-setup): kc-scheduler start file Signed-off-by: Mustafa Baser <mbaser@mail.com> --------- Signed-off-by: Mustafa Baser <mbaser@mail.com>
- Loading branch information
1 parent
5e2fa72
commit 89c799c
Showing
9 changed files
with
121 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
jans-linux-setup/jans_setup/static/system/systemd/kc-scheduler.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Keycloak Scheduler Service | ||
After=kc.service | ||
|
||
[Service] | ||
Type=simple | ||
Environment="JAVA_HOME=%(jre_home)s" | ||
Environment="SCHEDULER_HOME=%(scheduler_dir)s" | ||
Environment="SCHEDULER_VERSION=v%(jans_version)s" | ||
ExecStart=%(scheduler_dir)s/bin/kc-scheduler.sh | ||
User=%(jetty_user)s | ||
Group=%(jetty_group)s | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
1 change: 1 addition & 0 deletions
1
jans-linux-setup/jans_setup/templates/jans-saml/kc-scheduler/kc-scheduler-cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*/10 * * * * %(jetty_user)s %(scheduler_dir)s/bin/kc-scheduler.sh |
21 changes: 21 additions & 0 deletions
21
jans-linux-setup/jans_setup/templates/jans-saml/kc-scheduler/kc-scheduler.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#! /bin/bash | ||
|
||
JAVA_HOME=%(jre_home)s | ||
SCHEDULER_HOME=%(scheduler_dir)s | ||
SCHEDULER_VERSION=v%(jans_version)s | ||
|
||
APP_CONFIG_FILE=${SCHEDULER_HOME}/conf/config.properties | ||
LOG_CONFIG_FILE=${SCHEDULER_HOME}/conf/logback.xml | ||
|
||
if [ -z "$JAVA" ]; then | ||
if [ -n "$JAVA_HOME" ]; then | ||
JAVA="$JAVA_HOME/bin/java" | ||
else | ||
JAVA="java" | ||
fi | ||
fi | ||
|
||
$JAVA -Dapp.config="${APP_CONFIG_FILE}" \ | ||
-Dlogback.configurationFile="${SCHEDULER_HOME}/conf/logback.xml" \ | ||
-Dapp.version=${SCHEDULER_VERSION} -Dapp.home="${SCHEDULER_HOME}" \ | ||
-cp "${SCHEDULER_HOME}/lib/*" io.jans.kc.scheduler.App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters