added scripts

This commit is contained in:
Niklas 2018-10-11 00:01:27 +02:00
parent fd6f20da6a
commit f7114ef86c

View File

@ -0,0 +1,30 @@
Bash Script:
```
#!/bin/bash
cd /root/
systemctl stop ripmewebserver.service
timeout 300 java -jar ripme-1.7.67-jar-with-dependencies.jar -u https://www.reddit.com/r/<url>
timeout 300 java -jar ripme-1.7.67-jar-with-dependencies.jar -u https://www.reddit.com/r/<url>
systemctl start ripmewebserver.service
```
Systemd Script /etc/systemd/system/ripmewebserver.service
```
[Unit]
Description=Ripme Webserver Wrapper
[Service]
PermissionsStartOnly=true
WorkingDirectory=/root
ExecStart=/usr/bin/java -cp ripme-1.7.67-jar-with-dependencies.jar de.gurkengewuerz.ripmewrapper.Webserver
[Install]
WantedBy=multi-user.target
```