File: distributed-net.postinst

package info (click to toggle)
distributed-net 2.9112.521%2Barm64-3
  • links: PTS
  • area: non-free
  • in suites: bookworm, forky, sid, trixie
  • size: 9,336 kB
  • sloc: sh: 144; makefile: 51
file content (32 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

# exit if any errors occur
set -e

# Load debconf
. /usr/share/debconf/confmodule

# Configure the distributed.net client
db_get distributed-net/fullconfig
if [ $RET = "true" ]; then
	db_stop

	touch /etc/distributed-net.conf
	chown daemon:daemon /etc/distributed-net.conf

	cd /var/lib/distributed-net

	# Redirecting SDTIN from /dev/tty to workaroung bug #142944
	su daemon -s /bin/sh -c "/usr/bin/dnetc -ini /etc/distributed-net.conf -inbase /var/lib/distributed-net/buff-in -outbase /var/lib/distributed-net/buff-out -config" < /dev/tty
fi

# Set the ownership on the buffers.
chown daemon:daemon /var/lib/distributed-net/* 2>/dev/null || true
chown daemon:daemon /var/lib/distributed-net 2>/dev/null || true

# Create the log file initially.
touch /var/log/distributed-net.log
chown daemon:adm /var/log/distributed-net.log
chmod 640 /var/log/distributed-net.log

#DEBHELPER#