diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-05-23 17:02:01 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-05-23 17:02:01 +0530 |
| commit | a4e934512c56c0f9fb574f1169d8213e2730a014 (patch) | |
| tree | 7d1c3448a64f96d150dfc525871f69353990c2ba /linux/deb/02-fs-spring-boot-kamal | |
| parent | 3e152dd02b3d696d65700c7b39fe5f1e7d7e50ae (diff) | |
Moved jar service file in deb to /opt/mycompany dir
Diffstat (limited to 'linux/deb/02-fs-spring-boot-kamal')
| -rwxr-xr-x | linux/deb/02-fs-spring-boot-kamal/build.sh | 4 | ||||
| -rw-r--r-- | linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/conffiles | 1 | ||||
| -rwxr-xr-x | linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/postinst | 9 | ||||
| -rw-r--r-- | linux/deb/02-fs-spring-boot-kamal/package/etc/systemd/system/fs-spring-boot-kamal.service | 2 | ||||
| -rw-r--r-- | linux/deb/02-fs-spring-boot-kamal/package/opt/mycompany/fs-spring-boot-kamal/app/.gitignore (renamed from linux/deb/02-fs-spring-boot-kamal/package/opt/fs-spring-boot-kamal/app/.gitignore) | 0 |
5 files changed, 9 insertions, 7 deletions
diff --git a/linux/deb/02-fs-spring-boot-kamal/build.sh b/linux/deb/02-fs-spring-boot-kamal/build.sh index bd2fc95..c54571d 100755 --- a/linux/deb/02-fs-spring-boot-kamal/build.sh +++ b/linux/deb/02-fs-spring-boot-kamal/build.sh @@ -21,8 +21,8 @@ fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Check if the spring boot jar is in the correct location -if [ ! -f $DIR/package/opt/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar ]; then - errcho "[ERROR] Jar file missing: $DIR/package/opt/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar" +if [ ! -f $DIR/package/opt/mycompany/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar ]; then + errcho "[ERROR] Jar file missing: $DIR/package/opt/mycompany/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar" errcho "[ERROR] Run this build script only after placing the jar file in that location." exit 1 fi diff --git a/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/conffiles b/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/conffiles index 5c70b47..fd29976 100644 --- a/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/conffiles +++ b/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/conffiles @@ -1 +1,2 @@ /etc/fs-spring-boot-kamal/application.yaml +/etc/fs-spring-boot-kamal/environment.env diff --git a/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/postinst b/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/postinst index 19eec59..430ba0a 100755 --- a/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/postinst +++ b/linux/deb/02-fs-spring-boot-kamal/package/DEBIAN/postinst @@ -16,10 +16,11 @@ if [ "$1" == "configure" ] && [ -z "$2" ]; then fi # Set directory ownership and permissions - Application jar file not to be read by other system users -chown -R root:fs-spring-boot-kamal /opt/fs-spring-boot-kamal -chmod 750 /opt/fs-spring-boot-kamal -chmod 750 /opt/fs-spring-boot-kamal/app -chmod 640 /opt/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar +chown -R root:fs-spring-boot-kamal /opt/mycompany/fs-spring-boot-kamal +chmod 755 /opt/mycompany +chmod 750 /opt/mycompany/fs-spring-boot-kamal +chmod 750 /opt/mycompany/fs-spring-boot-kamal/app +chmod 640 /opt/mycompany/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar # Set directory ownership and permissions - Config files not to be read by other system users chown -R root:fs-spring-boot-kamal /etc/fs-spring-boot-kamal diff --git a/linux/deb/02-fs-spring-boot-kamal/package/etc/systemd/system/fs-spring-boot-kamal.service b/linux/deb/02-fs-spring-boot-kamal/package/etc/systemd/system/fs-spring-boot-kamal.service index 58a592c..c3e5f7d 100644 --- a/linux/deb/02-fs-spring-boot-kamal/package/etc/systemd/system/fs-spring-boot-kamal.service +++ b/linux/deb/02-fs-spring-boot-kamal/package/etc/systemd/system/fs-spring-boot-kamal.service @@ -4,7 +4,7 @@ Description=fs-spring-boot-kamal [Service] User=fs-spring-boot-kamal EnvironmentFile=/etc/fs-spring-boot-kamal/environment.env -ExecStart=/usr/bin/java -Dspring.config.import=optional:file:/etc/fs-spring-boot-kamal/application.yaml -jar /opt/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar +ExecStart=/usr/bin/java -Dspring.config.import=optional:file:/etc/fs-spring-boot-kamal/application.yaml -jar /opt/mycompany/fs-spring-boot-kamal/app/fs-spring-boot-kamal.jar Restart=always RestartSec=30 diff --git a/linux/deb/02-fs-spring-boot-kamal/package/opt/fs-spring-boot-kamal/app/.gitignore b/linux/deb/02-fs-spring-boot-kamal/package/opt/mycompany/fs-spring-boot-kamal/app/.gitignore index d392f0e..d392f0e 100644 --- a/linux/deb/02-fs-spring-boot-kamal/package/opt/fs-spring-boot-kamal/app/.gitignore +++ b/linux/deb/02-fs-spring-boot-kamal/package/opt/mycompany/fs-spring-boot-kamal/app/.gitignore |
