Ready for container
This commit is contained in:
12
handlers.go
12
handlers.go
@@ -84,13 +84,13 @@ func RecursiveZip(pathToZip, destinationPath string) error {
|
||||
|
||||
func backup(c *gin.Context) {
|
||||
|
||||
err := RecursiveZip("/root/.wine/drive_c/users/root/AppData/LocalLow/Stunlock Studios/VRisingServer/Saves", "data/backup.zip")
|
||||
err := RecursiveZip("/root/.wine/drive_c/users/root/AppData/LocalLow/Stunlock Studios/VRisingServer/Saves", "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/backup.zip")
|
||||
if err != nil {
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
backup, err := os.ReadFile("data/backup.zip")
|
||||
backup, err := os.ReadFile("root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/backup.zip")
|
||||
if err != nil {
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
return
|
||||
@@ -102,22 +102,22 @@ func backup(c *gin.Context) {
|
||||
func configure(c *gin.Context) {
|
||||
file, err := c.FormFile("ServerHostSettings.json")
|
||||
if err == nil {
|
||||
c.SaveUploadedFile(file, "data/ServerHostSettings.json")
|
||||
c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json")
|
||||
}
|
||||
|
||||
file, err = c.FormFile("ServerGameSettings.json")
|
||||
if err == nil {
|
||||
c.SaveUploadedFile(file, "data/ServerGameSettings.json")
|
||||
c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json")
|
||||
}
|
||||
|
||||
file, err = c.FormFile("adminlist.txt")
|
||||
if err == nil {
|
||||
c.SaveUploadedFile(file, "data/adminlist.txt")
|
||||
c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/adminlist.txt")
|
||||
}
|
||||
|
||||
file, err = c.FormFile("banlist.txt")
|
||||
if err == nil {
|
||||
c.SaveUploadedFile(file, "data/banlist.txt")
|
||||
c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/banlist.txt")
|
||||
}
|
||||
|
||||
updated_page, err := indexHTML.ReadFile("html/updated.html")
|
||||
|
||||
Reference in New Issue
Block a user