tor-dam initscripts upstreamed.

This commit is contained in:
parazyd 2018-02-19 13:32:55 +01:00
parent 2e7721b9ba
commit e9529c1450
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
4 changed files with 1 additions and 47 deletions

View File

@ -143,6 +143,7 @@ torpass="\$(echo "\$(shuf -n 2 /usr/share/dict/words --random-source=/dev/urando
sed -i python/damhs.py -e "s/topkek/\${torpass}/"
sed -i python/damauth.py -e "s/topkek/\${torpass}/"
make install
make install-init
torpass="\$(sudo -u debian-tor tor --hash-password "\${torpass}")"
sed -e 's/User tor/User debian-tor/' < contrib/torrc > /etc/tor/torrc

View File

@ -1,21 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command=/home/decode/go/bin/dam-client
pidfile=/var/run/dam-client.pid
description="Tor DAM client"
depend() {
after dam-dir
}
start() {
start-stop-daemon --start \
-u decode -g decode \
--make-pidfile --pidfile $pidfile \
--background \
--startas /bin/bash -- -c \
"exec $command >> /var/log/dam-client.log 2>&1"
}

View File

@ -1,17 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command=/home/decode/go/bin/dam-dir
pidfile=/var/run/dam-dir.pid
description="Tor DAM server"
depend() {
after logger
}
start() {
start-stop-daemon --start -u decode -g decode \
--pidfile $pidfile -b -m -x $command
}

View File

@ -1,9 +0,0 @@
#!/bin/sh
# rc.local for base images
[ -f /etc/ssh/ssh_host_rsa_key.pub ] || ssh-keygen -A
[ -f /etc/part-expand.sh ] && /etc/part-expand.sh
netdata
exit 0