newsProxy / newsProxy2.service /
2582d29 2 years ago
1 contributor
33 lines | 0.985kb
# note that if you change this file you will need to run `systemctl daemon-reload` to get systemd to notice
[Unit]
Description=newsProxy as a system service take 2

# After networking because we need that
After=network.target

[Service]

# Simple services don't do any forking / background nonsence
Type=simple

# User with which to run the service
User=ycawidro

# Any setup we need to do, specifying the shell because otherwise who knows what's up
#ExecStartPre=/bin/bash -c 'echo "hello world"'

# Set the working directory for the application
WorkingDirectory=/home/ycawidro/dev/newsProxy/

# Command to run the application
#ExecStart=/usr/bin/python3 /home/ycawidro/dev/newsProxy/newsProxy
#ExecStart=/home/ycawidro/dev/newsProxy/newsProxy.sh
ExecStart=/bin/bash -c 'cd /home/ycawidro/dev/newsProxy/ && /usr/bin/python3 newsProxy.py'

# Restart policy, only on failure
Restart=on-failure

[Install]
# Start the service before we get to multi-user mode
WantedBy=multi-user.target