Skip to content

Commit a8d154e

Browse files
committed
revert to demontools based startup
systemd scripts keeps on failing
1 parent 2363b71 commit a8d154e

File tree

7 files changed

+43
-7
lines changed

7 files changed

+43
-7
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ cd distribution
2222
### Running
2323

2424
```
25-
#start
26-
service orkaudio start
25+
##start
26+
sudo svc -u /etc/service/orkaudio
27+
# service orkaudio start
2728
28-
#stop
29-
service orkaudio stop
29+
##stop
30+
sudo svc -d /etc/service/orkaudio
31+
# service orkaudio stop
3032
3133
```
3234

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/etc/orkaudio/config.xml
2+
/etc/orkaudio/logging.properties

distribution/deb/orkaudio/DEBIAN/postinst

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ fi
2222
ldconfig
2323

2424
mkdir -p /var/log/orkaudio
25+
mkdir -p /var/log/orkaudio/svclog
2526

2627
echo "Starting orkaudio...."
27-
service orkaudio start || true
28+
svc -u /etc/service/orkaudio || true
2829

2930
fi
3031

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
set -x
33

4-
service orkaudio stop || true
4+
svc -d /etc/service/orkaudio || true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
exec multilog t s99999 n10 /var/log/orkaudio/svclog
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
exec 2>&1
3+
4+
exit_script() {
5+
echo "Shutdown!"
6+
CHILD_PID=$(cat /var/log/orkaudio/orkaudio.lock)
7+
8+
echo "Sending Kill to $CHILD_PID"
9+
trap - SIGINT SIGTERM # clear the trap
10+
kill -- $CHILD_PID # Sends SIGTERM to child/sub processes
11+
}
12+
13+
anywait(){
14+
for pid in "$@"; do
15+
while kill -0 "$pid"; do
16+
sleep 2
17+
done
18+
done
19+
}
20+
21+
trap exit_script SIGINT SIGTERM
22+
23+
# exec chpst -u USER COMMAND
24+
/usr/sbin/orkaudio
25+
26+
#watch on pid
27+
CHILD_PID=$(cat /var/log/orkaudio/orkaudio.lock)
28+
while kill -0 $CHILD_PID 2> /dev/null; do sleep 1; done;

distribution/make-orkaudio-deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ cp /oreka-src/orkaudio/plugins/*.so $BUILD_ROOT/usr/lib/orkaudio/plugins/
1919
find $BUILD_ROOT -name '.ignore' -delete
2020

2121
sed -i "s/_VERSION_/$VERSION/g" $BUILD_ROOT/DEBIAN/control
22-
dpkg-deb --build $BUILD_ROOT oreka.deb
22+
dpkg-deb --build $BUILD_ROOT orkaudio.deb
2323

2424
rm -rf $BUILD_ROOT

0 commit comments

Comments
 (0)