mirror of
https://github.com/dirtbags/moth.git
synced 2025-01-06 03:50:56 -07:00
20 lines
370 B
Bash
Executable file
20 lines
370 B
Bash
Executable file
#! /bin/sh
|
|
|
|
exec 2>&1
|
|
|
|
ip addr add 10.0.0.2/16 label eth0:mcp dev eth0
|
|
|
|
DB=/var/lib/ctf/tokens.db
|
|
|
|
if [ ! -f $DB ]; then
|
|
# Append any package-provided tokens
|
|
cat /opt/*/tokens.txt >$DB 2>/dev/null
|
|
chown ctf $DB
|
|
fi
|
|
|
|
for fn in /var/lib/ctf/tokens.db /var/lib/ctf/claim.db; do
|
|
touch $fn
|
|
chown ctf $fn
|
|
done
|
|
|
|
exec tcpsvd -u ctf 0 1 /opt/mcp/bin/in.tokend
|