Skip to content

Commit 0820ca1

Browse files
committed
update
1 parent 0a1ff97 commit 0820ca1

File tree

7 files changed

+8
-16
lines changed

7 files changed

+8
-16
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ nfpms:
6666
contents:
6767
# Ensure environment file exists with correct ownership
6868
- src: .env
69-
dst: /etc/vilesql/.env
69+
dst: /var/lib/vilesql/.env
7070
type: config
7171
file_info:
72-
mode: 600
72+
mode: 0755
7373
owner: vilesql
7474
group: vilesql
7575

@@ -96,14 +96,6 @@ nfpms:
9696
mode: 0755
9797
owner: vilesql
9898
group: vilesql
99-
100-
# Ensure config directory exists
101-
- dst: /etc/vilesql
102-
type: dir
103-
file_info:
104-
mode: 700
105-
owner: vilesql
106-
group: vilesql
10799
scripts:
108100
postinstall: "scripts/postinstall.sh"
109101
preremove: "scripts/preremove.sh"

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
var ConfigFiles =[]string{
1111
".env",
12-
"/etc/vilesql/.env",
12+
"/var/lib/vilesql/.env",
1313
}
1414

1515
func GetValue(key string) string {

scripts/postinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LOG_DIR="/var/log/vilesql"
99
LOG_FILE="$LOG_DIR/vilesql.log"
1010
BIN_PATH="/usr/bin/vilesql"
1111
SERVICE_PATH="/etc/systemd/system/vilesql.service"
12-
ENV_FILE="/etc/vilesql/.env"
12+
ENV_FILE="/var/lib/vilesql/.env"
1313
USER="vilesql"
1414
GROUP="vilesql"
1515

scripts/postremove.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
SYSTEMD_SERVICE="/etc/systemd/system/vilesql.service"
77
DATA_DIR="/var/lib/vilesql"
8-
CONFIG_DIR="/etc/vilesql"
8+
CONFIG_DIR="$DATA_DIR"
99
USER="vilesql"
1010
GROUP="vilesql"
1111

scripts/postupgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -e
55

66
DATA_DIR="/var/lib/vilesql"
7-
CONFIG_DIR="/etc/vilesql"
7+
CONFIG_DIR="$DATA_DIR"
88
SYSTEMD_SERVICE="/etc/systemd/system/vilesql.service"
99
USER="vilesql"
1010
GROUP="vilesql"

scripts/preremove.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USER="vilesql"
77
GROUP="vilesql"
88
SYSTEMD_SERVICE="/etc/systemd/system/vilesql.service"
99
DATA_DIR="/var/lib/vilesql"
10-
CONFIG_DIR="/etc/vilesql"
10+
CONFIG_DIR="$DATA_DIR"
1111

1212
log() {
1313
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"

scripts/uninstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ USER="vilesql"
1010
GROUP="vilesql"
1111
SERVICE_PATH="/etc/systemd/system/vilesql.service"
1212
DATA_DIR="/var/lib/vilesql"
13-
CONFIG_DIR="/etc/vilesql"
13+
CONFIG_DIR="$DATA_DIR"
1414

1515
log() {
1616
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"

0 commit comments

Comments
 (0)