added scripts
This commit is contained in:
parent
fd6f20da6a
commit
f7114ef86c
30
src/main/java/de/gurkengewuerz/ripmewrapper/README.md
Normal file
30
src/main/java/de/gurkengewuerz/ripmewrapper/README.md
Normal 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
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user