- Go to https://www.reddit.com/prefs/apps/ and create a new script app.
- Enter all relevant information to
praw.ini
- Install dependencies (praw and requests), e.g. with virtualenv and test script with:
# Create virtual enviorment for python
virtualenv .venv
# Activate enviorment and install requirements
source .venv/bin/activate
pip install -r requirements.txt
python undelete_bot.py
- Place all files in
/var/www/undelete
- Copy the service file with
cp /var/www/undelete/undelete.service /etc/systemd/system/undelete.service
- Start service with
sudo systemctl start undelete.service
Show logs with journalctl -u undelete.service