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