Skip to content

Instantly share code, notes, and snippets.

@kseistrup
Last active Mar 30, 2016
Embed
What would you like to do?
Service file for Zeronet
[Unit]
Description=Decentralized websites using Bitcoin crypto and the BitTorrent network
[Service]
User=zeronet
Group=zeronet
WorkingDirectory=/opt/zeronet
LimitNOFILE=8192
ExecStart=/opt/zeronet/zeronet --config_file /etc/zeronet.conf
Restart=on-failure
[Install]
WantedBy=default.target
#!/bin/bash
cd /opt/zeronet && {
export PYTHONIOENCODING='UTF-8'
export PYTHONUNBUFFERED='x'
export PYTHONOPTIMIZE='x'
export PYTHONHASHSEED='random'
if [[ -f venv/bin/activate ]]; then
echo "Activating virtualenv"
source venv/bin/activate
fi
exec -a zeronet python2 zeronet.py --tor disable "${@}"
}
sleep 1
exit 1
# eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment