diff --git a/Makefile b/Makefile
index f4c8cb4..c9e8963 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,9 @@ PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h
PKGIDENT=$(subst /,-,${PREFIX})
+FILE_MO := $(PKGNAME).mo
+LOCALE_DIR := ./locale
+
default_target: all
.PHONY: all init depend debug prepare check build uninstall install clean help
@@ -94,7 +97,6 @@ uninstall:
done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
- @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
@$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
@@ -105,61 +107,32 @@ uninstall:
install: check uninstall
@echo "Install ..."
- @for FILE_PO in $(wildcard *.po); do \
- LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
- install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
- FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
- PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
- echo "$${FILE_PO}"; \
- msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
+ @for po in $(LOCALE_DIR)/$(PKGNAME)_*.po; do \
+ lang=$$(basename $$po | sed -E 's/^$(PKGNAME)_([^.]+)\.po$$/\1/'); \
+ file=$$(find ./locale/ -name '*_'"$$lang"'.po'); \
+ msgfmt $$file -v -f -o ${DESTDIR}/usr/share/locale/$$lang/LC_MESSAGES/$(FILE_MO); \
done
+
@for SIZE in 16 32 48; do \
install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
done
- @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
+ @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
@cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy
@sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.checked.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.warning.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.view-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.play-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.stop-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.zoom-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.back-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.increase-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.decrease-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.profile-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.edit-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.check-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.uncheck-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.settings-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.trash-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.sort-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.sync-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.funnel-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.reset-symbolic.svg"
-
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic1-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic2-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic3-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic4-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic5-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic6-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic7-symbolic.svg"
- @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "journals_list.csv"
- @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "logging_services.csv"
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
- @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.auth.policy"
+ @ldconfig -n /usr/local/lib
@if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \
- [ -d "${DESTDIR}$/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \
+ [ -d "${DESTDIR}/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \
fi
@echo "Install: OK"
+
+
clean:
@echo "Clean ..."
@$(RM) -rd ${CMAKE_BUILD_DIR}
diff --git a/gresource.xml b/gresource.xml
index 23b9b6a..e05ccdb 100644
--- a/gresource.xml
+++ b/gresource.xml
@@ -19,4 +19,8 @@
ubl-settings-logging-banner.png
+
+ journals_list.csv
+ logging_services.csv
+
\ No newline at end of file
diff --git a/locale/journals_list.pot b/locale/journals_list.pot
new file mode 100644
index 0000000..06a9598
--- /dev/null
+++ b/locale/journals_list.pot
@@ -0,0 +1,54 @@
+# Language translations for ubl-settings-logging package.
+# Copyright (C) 2025, UBTech LLC
+# This file is distributed under the same license as the ubl-settings-logging package.
+# UBLinux Team , 2025
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ubl-settings-logging 1.0\n"
+"Report-Msgid-Bugs-To: support@ublinux.com\n"
+"POT-Creation-Date: 2025-05-20 00:00+0600\n"
+"PO-Revision-Date: 2025-05-20 00:00+0600\n"
+"Last-Translator: UBLinux Team \n"
+"Language-Team: UBLinux Team \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Log of work and requests to Acpid"
+msgstr ""
+
+msgid "Log of work and requests to the web server"
+msgstr ""
+
+msgid "Audit log"
+msgstr ""
+
+msgid "Log of authorization procedures"
+msgstr ""
+
+msgid "Job scheduler log (cron)"
+msgstr ""
+
+msgid "Log of work and calls to the print server (cups)"
+msgstr ""
+
+msgid "Log of operation and access to system services"
+msgstr ""
+
+msgid "Log of work and access to Samba"
+msgstr ""
+
+msgid "Postfix mail server log"
+msgstr ""
+
+msgid "System log"
+msgstr ""
+
+msgid "X.org display server log"
+msgstr ""
+
+msgid "Graphics X session log"
+msgstr ""
\ No newline at end of file
diff --git a/locale/journals_list_ru.po b/locale/journals_list_ru.po
new file mode 100644
index 0000000..0d6e952
--- /dev/null
+++ b/locale/journals_list_ru.po
@@ -0,0 +1,32 @@
+msgid "Log of work and requests to Acpid"
+msgstr "Журнал работы и обращений к Acpid"
+
+msgid "Log of work and requests to the web server"
+msgstr "Журнал работы и обращений к веб-серверу"
+
+msgid "Audit log"
+msgstr "Журнал аудита (audit)"
+
+msgid "Log of authorization procedures"
+msgstr "Журнал процедур авторизации"
+
+msgid "Job scheduler log (cron)"
+msgstr "Журнал работы планировщика заданий (cron)"
+
+msgid "Log of work and calls to the print server (cups)"
+msgstr "Журнал работы и обращений к серверу печати (cups)"
+
+msgid "Log of operation and access to system services"
+msgstr "Журнал работы и обращения к службам системы"
+
+msgid "Log of work and access to Samba"
+msgstr "Журнал работы и обращения к Samba"
+
+msgid "Postfix mail server log"
+msgstr "Журнал почтового сервера Postfix"
+
+msgid "System log"
+msgstr "Системный журнал"
+
+msgid "X.org display server log"
+msgstr "Журнал работы дисплейного сервера X.org"
\ No newline at end of file
diff --git a/ubl-settings-logging.pot b/locale/ubl-settings-logging.pot
similarity index 97%
rename from ubl-settings-logging.pot
rename to locale/ubl-settings-logging.pot
index 89e91f7..83fc866 100644
--- a/ubl-settings-logging.pot
+++ b/locale/ubl-settings-logging.pot
@@ -230,7 +230,7 @@ msgid "Log"
msgstr ""
#: source/ubl-strings.h:65
-msgid "Journald configuration"
+msgid "JournalD journal rotation and storage configuration"
msgstr ""
#: source/ubl-strings.h:66
@@ -281,7 +281,7 @@ msgstr ""
msgid "Type of forwarded messages:"
msgstr ""
-#: source/ubl-strings.h:79
+#: source/ubl-strings.h:79 source/ubl-strings.h:191
msgid "Journal configuration"
msgstr ""
@@ -370,7 +370,7 @@ msgid "Reset"
msgstr ""
#: source/ubl-strings.h:103
-msgid "Logrotate configuration"
+msgid "Logrotate log rotation and storage configuration"
msgstr ""
#: source/ubl-strings.h:104
@@ -691,10 +691,6 @@ msgstr ""
msgid "Remove log configuration"
msgstr ""
-#: source/ubl-strings.h:191
-msgid "Journal configuration"
-msgstr ""
-
#: source/ubl-strings.h:192
msgid "Path (-s):"
msgstr ""
@@ -719,66 +715,71 @@ msgstr ""
msgid "Journal/log files were not found"
msgstr ""
-#: source/ubl-strings.h:200
-msgid "Rules"
+#: source/ubl-strings.h:198
+#, c-format
+msgid "Journal \"%s\" configuration"
msgstr ""
#: source/ubl-strings.h:201
-msgid "Owner rules"
+msgid "Rules"
msgstr ""
#: source/ubl-strings.h:202
-msgid "Group rules"
+msgid "Owner rules"
msgstr ""
#: source/ubl-strings.h:203
-msgid "Public rules"
+msgid "Group rules"
msgstr ""
#: source/ubl-strings.h:204
-msgid "Read"
+msgid "Public rules"
msgstr ""
#: source/ubl-strings.h:205
-msgid "Write"
+msgid "Read"
msgstr ""
#: source/ubl-strings.h:206
-msgid "Execute"
+msgid "Write"
msgstr ""
#: source/ubl-strings.h:207
+msgid "Execute"
+msgstr ""
+
+#: source/ubl-strings.h:208
msgid "Value:"
msgstr ""
-#: source/ubl-strings.h:210
+#: source/ubl-strings.h:211
msgid ": no such file(s)"
msgstr ""
-#: source/ubl-strings.h:211
+#: source/ubl-strings.h:212
msgid "Parameter"
msgstr ""
-#: source/ubl-strings.h:212
+#: source/ubl-strings.h:213
msgid "Old value"
msgstr ""
-#: source/ubl-strings.h:213
+#: source/ubl-strings.h:214
msgid "New value"
msgstr ""
-#: source/ubl-strings.h:215
+#: source/ubl-strings.h:216
msgid "Choose a path"
msgstr ""
-#: source/ubl-strings.h:216
+#: source/ubl-strings.h:217
msgid "Saving"
msgstr ""
-#: source/ubl-strings.h:218
+#: source/ubl-strings.h:219
msgid "Authorization has been elevated"
msgstr ""
-#: source/ubl-strings.h:219
+#: source/ubl-strings.h:220
msgid "Authorization has been unelevated"
msgstr ""
diff --git a/ubl-settings-logging_ru.po b/locale/ubl-settings-logging_ru.po
similarity index 90%
rename from ubl-settings-logging_ru.po
rename to locale/ubl-settings-logging_ru.po
index a0c2cfe..62d4038 100644
--- a/ubl-settings-logging_ru.po
+++ b/locale/ubl-settings-logging_ru.po
@@ -56,7 +56,7 @@ msgstr "Журналы"
#: source/ubl-strings.h:17
msgid "Services"
-msgstr "Сервисы"
+msgstr "Службы"
#: source/ubl-strings.h:18
msgid "Log/Journal"
@@ -104,7 +104,7 @@ msgstr "Статус"
#: source/ubl-strings.h:29
msgid "Service"
-msgstr "Сервис"
+msgstr "Служба"
#: source/ubl-strings.h:30
msgid "Autostart"
@@ -122,54 +122,6 @@ msgstr "Включить автозапуск"
msgid "System event log"
msgstr "Системный журнал событий"
-#: source/ubl-strings.h:34
-msgid "Log of work and requests to Acpid"
-msgstr "Журнал работы и обращений к Acpid"
-
-#: source/ubl-strings.h:35
-msgid "Log of work and requests to the web server"
-msgstr "Журнал работы и обращений к веб-серверу"
-
-#: source/ubl-strings.h:36
-msgid "Audit log"
-msgstr "Журнал аудита (audit)"
-
-#: source/ubl-strings.h:37
-msgid "Log of authorization procedures"
-msgstr "Журнал процедур авторизации"
-
-#: source/ubl-strings.h:38
-msgid "Job scheduler log (cron)"
-msgstr "Журнал работы планировщика заданий (cron)"
-
-#: source/ubl-strings.h:39
-msgid "Log of work and calls to the print server (cups)"
-msgstr "Журнал работы и обращений к серверу печати (cups)"
-
-#: source/ubl-strings.h:40
-msgid "Log of operation and access to system services"
-msgstr "Журнал работы и обращения к службам системы"
-
-#: source/ubl-strings.h:41
-msgid "Log of work and access to Samba"
-msgstr "Журнал работы и обращения к Samba"
-
-#: source/ubl-strings.h:42
-msgid "Postfix mail server log"
-msgstr "Журнал почтового сервера Postfix"
-
-#: source/ubl-strings.h:43
-msgid "System log"
-msgstr "Системный журнал"
-
-#: source/ubl-strings.h:44
-msgid "X.org display server log"
-msgstr "Журнал работы дисплейного сервера X.org"
-
-#: source/ubl-strings.h:45
-msgid "Graphics X session log"
-msgstr "Журнал сеансов графической системы X"
-
#: source/ubl-strings.h:46
msgid "Save"
msgstr "Сохранить"
@@ -235,8 +187,8 @@ msgid "Log"
msgstr "Запись лога"
#: source/ubl-strings.h:65
-msgid "Journald configuration"
-msgstr "Конфигурация сервиса journald"
+msgid "JournalD journal rotation and storage configuration"
+msgstr "Настройка ротации и хранения журналов JournalD"
#: source/ubl-strings.h:66
msgid "Description:"
@@ -286,7 +238,7 @@ msgstr "TTY:"
msgid "Type of forwarded messages:"
msgstr "Тип перенаправляемых сообщений:"
-#: source/ubl-strings.h:79
+#: source/ubl-strings.h:79 source/ubl-strings.h:191
msgid "Journal configuration"
msgstr "Настройка файла журнала"
@@ -375,7 +327,7 @@ msgid "Reset"
msgstr "По умолчанию"
#: source/ubl-strings.h:103
-msgid "Logrotate configuration"
+msgid "Logrotate log rotation and storage configuration"
msgstr "Настройка ротации и хранения журналов Logrotate"
#: source/ubl-strings.h:104
@@ -723,67 +675,72 @@ msgstr "Размер лога:"
msgid "Journal/log files were not found"
msgstr "Файлы журналов/логов не были найдены"
-#: source/ubl-strings.h:200
+#: source/ubl-strings.h:198
+#, fuzzy, c-format
+msgid "Journal \"%s\" configuration"
+msgstr "Настройка журналов \"%s\""
+
+#: source/ubl-strings.h:201
msgid "Rules"
msgstr "Правила"
-#: source/ubl-strings.h:201
+#: source/ubl-strings.h:202
msgid "Owner rules"
msgstr "Правила владельца"
-#: source/ubl-strings.h:202
+#: source/ubl-strings.h:203
msgid "Group rules"
msgstr "Правила группы"
-#: source/ubl-strings.h:203
+#: source/ubl-strings.h:204
msgid "Public rules"
msgstr "Правила остальных"
-#: source/ubl-strings.h:204
+#: source/ubl-strings.h:205
msgid "Read"
msgstr "Чтение"
-#: source/ubl-strings.h:205
+#: source/ubl-strings.h:206
msgid "Write"
msgstr "Запись"
-#: source/ubl-strings.h:206
+#: source/ubl-strings.h:207
msgid "Execute"
msgstr "Исполнение"
-#: source/ubl-strings.h:207
+#: source/ubl-strings.h:208
msgid "Value:"
msgstr "Значение:"
-#: source/ubl-strings.h:210
+#: source/ubl-strings.h:211
msgid ": no such file(s)"
msgstr ": файл(ы) не найден(ы)"
-#: source/ubl-strings.h:211
+#: source/ubl-strings.h:212
msgid "Parameter"
msgstr "Параметр"
-#: source/ubl-strings.h:212
+#: source/ubl-strings.h:213
msgid "Old value"
msgstr "Старое значение"
-#: source/ubl-strings.h:213
+#: source/ubl-strings.h:214
msgid "New value"
msgstr "Новое значение"
-#: source/ubl-strings.h:215
+#: source/ubl-strings.h:216
msgid "Choose a path"
msgstr "Выбор пути"
-#: source/ubl-strings.h:216
+#: source/ubl-strings.h:217
msgid "Saving"
msgstr "Сохранение"
-#: source/ubl-strings.h:218
+#: source/ubl-strings.h:219
msgid "Authorization has been elevated"
msgstr ""
-#: source/ubl-strings.h:219
+#: source/ubl-strings.h:220
msgid "Authorization has been unelevated"
msgstr ""
diff --git a/logging_services.csv b/logging_services.csv
index 68cbbe0..9a8ac86 100644
--- a/logging_services.csv
+++ b/logging_services.csv
@@ -1,5 +1,5 @@
Service_Name;Service_Description;Сommand_Start;Сommand_Stop;Сommand_Enable;Сommand_Disable;Сommand_Status;Сommand_Status_Active;Сommand_Status_Enabled
journald;System event log;systemctl start systemd-journald.service;systemctl stop systemd-journald.service;ubconfig --default set [system] SERVICES_DISABLE--=systemd-journald.service SERVICES_ENABLE++=systemd-journald.service;ubconfig --default set [system] SERVICES_ENABLE--=systemd-journald.service SERVICES_DISABLE++=systemd-journald.service;systemctl status systemd-journald.service --no-pager;systemctl --quiet is-active systemd-journald.service;systemctl --quiet is-enabled systemd-journald.service
-logrotate;System event log rotation service;systemctl start logrotate.timer logrotate.service;systemctl stop logrotate.timer logrotate.service;ubconfig --default set [system] SERVICES_DISABLE--=logrotate.timer SERVICES_ENABLE++=logrotate.timer;ubconfig --default set [system] SERVICES_ENABLE--=logrotate.timer SERVICES_DISABLE++=logrotate.timer;systemctl status logrotate.timer logrotate.service --no-pager;systemctl --quiet is-active logrotate.timer;systemctl --quiet is-enabled logrotate.timer
+logrotate;System event log rotation service;systemctl start logrotate.timer logrotate.service;systemctl stop logrotate.timer logrotate.service;ubconfig --default set [system] SERVICES_DISABLE--=logrotate.timer SERVICES_ENABLE++=logrotate.timer;ubconfig --default set [system] SERVICES_ENABLE--=logrotate.timer SERVICES_DISABLE++=logrotate.timer;systemctl status logrotate.timer --no-pager;systemctl --quiet is-active logrotate.timer;systemctl --quiet is-enabled logrotate.timer
#metalog;System event log;systemctl start metalog.service;systemctl stop metalog.service;ubconfig --default set [system] SERVICES_DISABLE--=metalog.service SERVICES_ENABLE++=metalog.service;ubconfig --default set [system] SERVICES_ENABLE--=metalog.service SERVICES_DISABLE++=metalog.service;systemctl status metalog.service --no-pager;systemctl --quiet is-active metalog.service;systemctl --quiet is-enabled metalog.service
#syslog-ng;Service for collecting messages from system events of active network devices;systemctl start syslog-ng.service;systemctl stop syslog-ng.service;ubconfig --default set [system] SERVICES_DISABLE--=syslog-ng.service SERVICES_ENABLE++=syslog-ng.service;ubconfig --default set [system] SERVICES_ENABLE--=syslog-ng.service SERVICES_DISABLE++=syslog-ng.service;systemctl status syslog-ng.service --no-pager;systemctl --quiet is-active syslog-ng.service;systemctl --quiet is-enabled syslog-ng.service
\ No newline at end of file
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index c71eb86..f92bf0d 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -50,6 +50,8 @@ set(DEPENDFILES
../gresource.xml
../ubl-settings-logging-banner.png
../ubl-settings-logging.css
+ ../journals_list.csv
+ ../logging_services.csv
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c
index baf29b5..0b0ee63 100644
--- a/source/ubl-settings-logging.c
+++ b/source/ubl-settings-logging.c
@@ -100,8 +100,8 @@ void yon_journald_size_update(journald_window *window){
if (logsize){
if (logsize[0][strlen(logsize[0])-1]=='\n')
logsize[0][strlen(logsize[0])-1]='\0';
+ gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),logsize[0]);
}
- gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),logsize[0]);
}
int yon_load_proceed(YON_CONFIG_TYPE type){
@@ -144,20 +144,20 @@ int yon_load_proceed(YON_CONFIG_TYPE type){
void on_load_global(){
yon_load_proceed(YON_CONFIG_GLOBAL);
- main_config.load_mode=0;
+ main_config.load_mode=YON_CONFIG_GLOBAL;
update_loaded_logrotate();
}
void on_load_local(){
yon_load_proceed(YON_CONFIG_LOCAL);
- main_config.load_mode=1;
+ main_config.load_mode=YON_CONFIG_LOCAL;
update_loaded_logrotate();
}
void on_config_custom_load(GtkWidget *,main_window *){
yon_load_proceed(YON_CONFIG_CUSTOM);
- main_config.load_mode=3;
+ main_config.load_mode=YON_CONFIG_CUSTOM;
// yon_interface_update(widgets);
}
@@ -1874,6 +1874,7 @@ void on_log_edit_logrotate_settings(GtkWidget *, dictionary *dict){
gtk_widget_set_can_focus(dialog->LogDescriptionEntry,0);
gtk_entry_set_has_frame(GTK_ENTRY(dialog->LogNameEntry),0);
gtk_entry_set_has_frame(GTK_ENTRY(dialog->LogDescriptionEntry),0);
+ gtk_widget_grab_focus(dialog->LogPathAddButton);
gtk_style_context_add_class(gtk_widget_get_style_context(dialog->LogNameEntry),"nobackground");
gtk_style_context_add_class(gtk_widget_get_style_context(dialog->LogDescriptionEntry),"nobackground");
@@ -2423,7 +2424,7 @@ add_log_window *on_add_open(main_window *widgets){
window->LogPathsBox=yon_gtk_builder_get_widget(builder,"LogPathsBox");
window->NameEntry=yon_gtk_builder_get_widget(builder,"NameEntry");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
- gtk_window_set_title(GTK_WINDOW(window->MainWindow),MONITOR_TITLE_LABEL);
+ window->HeaderLabel=yon_gtk_builder_get_widget(builder,"headerTopic");
gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window));
window->log_name=NULL;
dictionary *dict = NULL;
@@ -2616,6 +2617,10 @@ void on_log_edit(GtkWidget *,main_window *widgets){
gtk_widget_set_sensitive(window->JournaldButton,0);
gtk_widget_set_sensitive(window->LogrotateButton,0);
}
+ char *title = malloc(sizeof(char)*strlen(JOURNALD_LOG_TITLE_LABEL)+strlen(name)+1);
+ sprintf(title,JOURNALD_LOG_TITLE_LABEL,name);
+ gtk_label_set_text(GTK_LABEL(window->HeaderLabel),title);
+ gtk_window_set_title(GTK_WINDOW(window->MainWindow),title);
if (!strcmp(name,"journald")){
gtk_widget_hide(window->LogrotateButton);
gtk_widget_hide(window->MetalogButton);
@@ -2624,9 +2629,10 @@ void on_log_edit(GtkWidget *,main_window *widgets){
int sz;
config_str logsize = yon_config_load(journald_size_command,&sz);
- if (logsize)
+ if (logsize){
if (logsize[0][strlen(logsize[0])-1]=='\n') logsize[0][strlen(logsize[0])-1]='\0';
gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),logsize[0]);
+ }
g_signal_connect(G_OBJECT(window->JournaldButton),"clicked", G_CALLBACK(on_journald_open),widgets);
} else {
gtk_widget_hide(window->JournaldButton);
@@ -3009,7 +3015,7 @@ void config_init(){
main_config.lock_save_global=0;
main_config.lock_save_local=0;
main_config.remove_thread=-1;
- main_config.load_mode=1;
+ main_config.load_mode=YON_CONFIG_LOCAL;
main_config.save_config=1;
main_config.queue=NULL;
main_config.queue_size=0;
@@ -3088,7 +3094,7 @@ void yon_main_window_complete(template_main_window **window){
char *cname=NULL;
char *cparams="";
GtkTreeIter iter;
- config_str journals = yon_file_open(journals_list_path,&size);
+ config_str journals = yon_resource_open_file(journals_list_path,&size);
for (int i=1;ilist,&iter,0,log[0],1,log[1],2,_(log[2]),3,1,4,psize,-1);
}
- config_str services = yon_file_open(services_list_path,&service_size);
+ config_str services = yon_resource_open_file(services_list_path,&service_size);
for (int i=1;i
-
+
@@ -993,7 +993,7 @@
5
5
2
- Journald configuration
+ JournalD journal rotation and storage configuration
diff --git a/ubl-settings-logging-logrotate-table.glade b/ubl-settings-logging-logrotate-table.glade
index 9d6f8a4..6dcbca0 100644
--- a/ubl-settings-logging-logrotate-table.glade
+++ b/ubl-settings-logging-logrotate-table.glade
@@ -361,7 +361,7 @@
5
5
2
- Logs and events - logrotate table
+ Logrotate table
diff --git a/ubl-settings-logging-logrotate.glade b/ubl-settings-logging-logrotate.glade
index 01f3093..c72d20c 100644
--- a/ubl-settings-logging-logrotate.glade
+++ b/ubl-settings-logging-logrotate.glade
@@ -1,5 +1,5 @@
-
+
@@ -2108,7 +2108,7 @@
5
5
2
- Logrotate configuration
+ Logrotate log rotation and storage configuration