File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ SCHEMA_FILE="/usr/share/${PACKAGE_NAME}/db_schema.sql"
77DEFAULTS_FILE=" /etc/default/${PACKAGE_NAME} "
88SYSTEMD_DROPIN_DIR=" /etc/systemd/system/${PACKAGE_NAME} .service.d"
99SYSTEMD_DROPIN_FILE=" ${SYSTEMD_DROPIN_DIR} /10-run-as.conf"
10+ LOG_DIR=" /var/log/${PACKAGE_NAME} "
11+ DATA_DIR=" /var/lib/${PACKAGE_NAME} "
1012
1113DB_NAME=" tgadmin"
1214DB_USER=" tgadmin"
@@ -88,6 +90,11 @@ DROPIN
8890 systemctl daemon-reload || true
8991}
9092
93+ ensure_runtime_directories () {
94+ install -d -m 0750 -o " ${SERVICE_USER} " -g " ${SERVICE_GROUP} " " ${LOG_DIR} "
95+ install -d -m 0750 -o " ${SERVICE_USER} " -g " ${SERVICE_GROUP} " " ${DATA_DIR} "
96+ }
97+
9198case " $1 " in
9299 configure)
93100 # ----------------------------------------------------------------
@@ -115,6 +122,7 @@ case "$1" in
115122
116123 resolve_service_identity
117124 ensure_service_account
125+ ensure_runtime_directories
118126 configure_systemd_service_user
119127
120128 # ----------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments