Skip to content

Commit 46f5959

Browse files
author
NoxiFoxi
committed
Added cd working dir, added screen prerequisite
1 parent e5ed2e5 commit 46f5959

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Simple backup script for servers running in screen using 7zip for compression.
33

44
## Prerequisites
5+
- **screen**
56
- **p7zip**
67
- **cron** or similar (for automatic backups)
78

autostart.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/bash
22

3-
# don't execute script if backup is in progress
4-
[ -f backup.lock ] && exit 0
5-
6-
73
# ======== #
84
# Config #
95
# ======== #
6+
cd /home/minecraft/ # change working directory where the scripts are located
7+
8+
# don't execute script if backup is in progress
9+
[ -f backup.lock ] && exit 0
10+
1011
server_jar="fabric-server-launch.jar" # server jar to monitor
1112
screen_name="minecraft" # name of the screen the server is running
12-
dir="minecraft" # cd the screen session in this directory
13+
dir="." # cd the screen session in this directory ("." if no change)
1314
start_script="start.sh"
1415

1516

backup.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# ======== #
44
# Config #
55
# ======== #
6+
cd /home/minecraft/ # change working directory where the scripts are located
67
sleep=10 # wait time for the backup in seconds after the anouncement
78
stop_server=0 # 0-1
89
source_path="/home/minecraft/server/*"

0 commit comments

Comments
 (0)