diff options
author | David Walter Seikel | 2016-11-27 23:58:40 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-27 23:58:40 +1000 |
commit | ed0de24e6bc2cac4c20051070710557055b463d0 (patch) | |
tree | 888f55c8f7317f96cc00450f886c9d52ac64e8ef /scripts/start-sim | |
parent | Fix "only backup people that have logged in since last time", due to OpenSim ... (diff) | |
download | opensim-SC_OLD-ed0de24e6bc2cac4c20051070710557055b463d0.zip opensim-SC_OLD-ed0de24e6bc2cac4c20051070710557055b463d0.tar.gz opensim-SC_OLD-ed0de24e6bc2cac4c20051070710557055b463d0.tar.bz2 opensim-SC_OLD-ed0de24e6bc2cac4c20051070710557055b463d0.tar.xz |
Various little backup system fixes.
Diffstat (limited to '')
-rwxr-xr-x | scripts/start-sim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/start-sim b/scripts/start-sim index 72bb9ba..6c87e09 100755 --- a/scripts/start-sim +++ b/scripts/start-sim | |||
@@ -101,7 +101,8 @@ case $(basename $0) in | |||
101 | ;; | 101 | ;; |
102 | 102 | ||
103 | "backup-inventory") | 103 | "backup-inventory") |
104 | user=$($SUDO ${PRGDIR}/gitAR.sh i "${inventory}") | 104 | $SUDO ${PRGDIR}/gitAR.sh i "${inventory}" |
105 | user=$(sanitize "${inventory}") | ||
105 | # Add the full date and time to create the IAR file name. | 106 | # Add the full date and time to create the IAR file name. |
106 | cmd="save iar -c ${inventory} / password ${PRGDIR}/../../backups/${user}-${date}.iar" | 107 | cmd="save iar -c ${inventory} / password ${PRGDIR}/../../backups/${user}-${date}.iar" |
107 | # Do it in the highest numbered window. | 108 | # Do it in the highest numbered window. |
@@ -110,13 +111,13 @@ case $(basename $0) in | |||
110 | ;; | 111 | ;; |
111 | 112 | ||
112 | "backup-sim") | 113 | "backup-sim") |
113 | sim=$($SUDO ${PRGDIR}/gitAR.sh o "${title}") | 114 | $SUDO ${PRGDIR}/gitAR.sh o "${title}" |
115 | sim=$(sanitize "${title}") | ||
114 | # Add the full date and time to create the OAR file name. | 116 | # Add the full date and time to create the OAR file name. |
115 | cmd="save oar --all ${PRGDIR}/../../backups/${sim}-${date}.oar" | 117 | cmd="save oar --all ${PRGDIR}/../../backups/${sim}-${date}.oar" |
116 | if [ -e /var/run/opensim/${tgt}.pid ]; then | 118 | if [ -e /var/run/opensim/${tgt}.pid ]; then |
117 | ${tmux_send}:"[${title}]" "${cmd}" Enter | 119 | ${tmux_send}:"[${title}]" "${cmd}" Enter |
118 | # Wait a bit, then generate the map tiles, coz the good generator leaks memory badly if you leave it turned on. | 120 | # Generate the map tiles, coz the good generator leaks memory badly if you leave it turned on. |
119 | sleep 30 | ||
120 | ${tmux_send}:"[${title}]" "generate map" Enter | 121 | ${tmux_send}:"[${title}]" "generate map" Enter |
121 | ${tmux_send}:"[${title}]" "force gc" Enter | 122 | ${tmux_send}:"[${title}]" "force gc" Enter |
122 | else | 123 | else |