ftpbot/install.sh

20 lines
529 B
Bash
Raw Normal View History

2016-10-30 16:10:31 +01:00
#!/bin/bash
# TODO: Make sure this is executed from within its original directory!
virtualenv ./venv
. ./venv/bin/activate
pip install -r requirements.txt
# Prepare a systemd service unit file with current pwd and user data
USER=`id -un`
GROUP=`id -gn`
PWD=`pwd`
cp ftpbot.service.example ftpbot.service
sed -i "s#%USER%#$USER#g" ftpbot.service
sed -i "s#%GROUP%#$GROUP#g" ftpbot.service
sed -i "s#%PWD%#$PWD#g" ftpbot.service
echo "Put ftpbot.servive within /etc/systemd/system and use systemctl to configure the service."