Skip to content
Snippets Groups Projects
Commit 3118910d authored by ale's avatar ale
Browse files

use pseudo-standard service directory

parent 55e3af32
No related branches found
Tags
No related merge requests found
......@@ -19,7 +19,7 @@ set -e
create_users() {
if ! getent passwd log 2>/dev/null ; then
if ! getent passwd log >/dev/null ; then
adduser --system --home /var/log --no-create-home --group log
fi
}
......@@ -35,7 +35,7 @@ create_log_dir() {
activate_services() {
for svc in $@ ; do
test -e /etc/service/$svc \
|| ln -s /etc/radioai/svc/$svc /etc/service/$svc
|| ln -s /etc/svc/$svc /etc/service/$svc
done
}
......
......@@ -19,7 +19,7 @@ export DH_OPTIONS
GOPKG = git.autistici.org/ale/radioai
DESTDIR = $(CURDIR)/debian/radioai
SVCDIR = $(DESTDIR)/etc/radioai/svc
SVCDIR = $(DESTDIR)/etc/svc
%:
dh $@
......@@ -46,8 +46,8 @@ override_dh_install:
install -d -o root -g root $(SVCDIR)/$$f/log ; \
install -m 755 -o root -g root debian/services/$$f \
$(SVCDIR)/$$f/run ; \
chmod 0755 $(SVCDIR)/$$f/log/run ; \
echo -e '#!/bin/sh\nexec chpst -u log svlogd -tt /var/log/radioai/'$$f > \
$(SVCDIR)/$$f/log/run ; \
chmod 0755 $(SVCDIR)/$$f/log/run ; \
done)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment