-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL
81 lines (69 loc) · 2.43 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Installation notes for mp3cat
To compile and install the mp3cat program:
git clone https://github.com/tomclegg/mp3cat
cd mp3cat
make install
To clean up an MP3 file by removing everything other than valid MP3
frames:
mp3cat - - < dirty.mp3 > clean.mp3
** The following installation procedures have not been tested! If you
** have problems, write to [email protected] and I might be able to
** help you.
For the following applications, you'll also need Daniel J. Bernstein's
daemontools software. See http://cr.yp.to/daemontools.html
To set up a logger, recording the sound card's line input:
pw useradd mp3logger
mkdir -p /var/service/mp3logger
cp example.logger /var/service/mp3logger/run
cd /var/service/mp3logger
chmod +x run
ln -s /PATH/TO/MP3/STORAGE mp3dir
mkdir log log/main
pw useradd mp3loggerl -d /var/service/mp3logger
chown mp3loggerl log/main
chmod +t .
(echo '#!/bin/sh'; echo 'exec setuidgid mp3loggerl multilog t s99999 n3 ./main/') > log/run
chmod +x log/run
cd /service
ln -s /var/service/mp3logger
Important: the above service will fill up your disk if you don't also
set up a cleaning service:
mkdir /var/service/mp3loggerc
cp example.clean /var/service/mp3loggerc/run
cd /var/service/mp3loggerc
chmod +x run
ln -s /PATH/TO/MP3/STORAGE mp3dir
mkdir log log/main
chown mp3loggerl log/main
chmod +t .
(echo '#!/bin/sh'; echo 'exec setuidgid mp3loggerl multilog t s99999 n3 ./main/') > log/run
chmod +x log/run
# test it:
./run
# if it works, press control-C to stop it, then set up a supervised copy:
cd /service
ln -s /var/service/mp3logger
To set up a publicly accessible MP3 stream. Requires djb's ucspi-tcp
software -- see http://cr.yp.to/ucspi-tcp.html
mkdir /var/service/mp3stream
cp example.stream /var/service/mp3stream/run
cd /var/service/mp3stream
chmod +x run
mkdir env
# replace MY.STREAM.IP.ADDRESS, MY.HOST.NAME, PORTNUMBER with your values
echo MY.STREAM.IP.ADDRESS >env/IP
echo MY.HOST.NAME >env/HOSTNAME
echo PORTNUMBER >env/PORT
pw useradd mp3stream -d /var/service/mp3stream
pw useradd mp3stream -d /var/service/mp3stream
mkdir log log/main
chown mp3stream log/main
chmod
chmod +t .
(echo '#!/bin/sh'; echo 'exec setuidgid mp3stream multilog t s99999 n3 ./main/') > log/run
chmod +x log/run
# test it:
./run
# if it works, press control-C to stop it, then set up a supervised copy:
cd /service
ln -s /var/service/mp3logger