aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/backup-inventories.sh2
-rwxr-xr-xscripts/backup-sims.sh2
-rwxr-xr-xscripts/common.sh2
-rw-r--r--scripts/install/opensim-monit.conf29
-rw-r--r--scripts/install/opensim.tmux.conf29
5 files changed, 27 insertions, 37 deletions
diff --git a/scripts/backup-inventories.sh b/scripts/backup-inventories.sh
index e4e7158..f819f79 100755
--- a/scripts/backup-inventories.sh
+++ b/scripts/backup-inventories.sh
@@ -27,5 +27,5 @@ mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User I
27 ${PRGDIR}/backup-inventory "${user}" 27 ${PRGDIR}/backup-inventory "${user}"
28 # Sleep for a while, so that there is plenty of time to do the backup, 28 # Sleep for a while, so that there is plenty of time to do the backup,
29 # and we are not keeping the computer very busy if there are lots of users. 29 # and we are not keeping the computer very busy if there are lots of users.
30 sleep ${sizeSleep} 30# sleep ${sizeSleep}
31done 31done
diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh
index 06cb780..39ab30a 100755
--- a/scripts/backup-sims.sh
+++ b/scripts/backup-sims.sh
@@ -13,7 +13,7 @@ do
13 ./backup-sim 13 ./backup-sim
14 # Sleep for a while, so that there is plenty of time to do the backup, 14 # Sleep for a while, so that there is plenty of time to do the backup,
15 # and we are not keeping the computer very busy if there are lots of sims. 15 # and we are not keeping the computer very busy if there are lots of sims.
16 sleep ${sizeSleep} 16# sleep ${sizeSleep}
17 popd > /dev/null 17 popd > /dev/null
18 fi 18 fi
19done 19done
diff --git a/scripts/common.sh b/scripts/common.sh
index 6aeb8b5..75aebb0 100755
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -36,7 +36,7 @@ num2name()
36# name=$(sanitize "the name") 36# name=$(sanitize "the name")
37sanitize() 37sanitize()
38{ 38{
39 echo "$1" | sed -e 's/[\\/:\*\?"<>\|@#$%&\0\x01-\x1F\x27\x40\x60\x7F. ]/_/g' -e 's/^$/NONAME/' 39 echo "$1" | sed -e 's/[\\/:\*\?"<>\|@#$%&\x01-\x1F\x27\x40\x60\x7F. ]/_/g' -e 's/^$/NONAME/'
40} 40}
41 41
42 42
diff --git a/scripts/install/opensim-monit.conf b/scripts/install/opensim-monit.conf
deleted file mode 100644
index 409b69e..0000000
--- a/scripts/install/opensim-monit.conf
+++ /dev/null
@@ -1,29 +0,0 @@
1# manage the OpenSim process for Your Sim
2#
3# usage:
4# monit start your_sim
5# monit stop your_sim
6# monit restart your_sim
7#
8# see 'daemon' setting in /etc/monit/monitrc for the cycle length.
9# on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in
10# /etc/default/monit . the below assumes you've set it to 30 seconds.
11#
12# see ../README for configuration instructions.
13#
14# Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l.
15#
16check process simSIM_NUMBER with pidfile /OS_PATH/caches/simSIM_NUMBER.pid
17 start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /OS_PATH/config/simSIM_NUMBER && /OS_PATH/config/simSIM_NUMBER/start-sim -q'"
18 as uid root and gid root
19 stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /OS_PATH/config/simSIM_NUMBER && /OS_PATH/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds
20 if cpu usage > 50% for 4 cycles then restart
21 if MEMORY usage > 10% for 4 cycles then restart
22# if 5 restarts within 5 cycles then timeout
23# if failed url http://127.0.0.1:9005/jsonSimStats/
24# and content != '"SimFPS":0.0,' for 4 cycles
25# then restart
26# if failed url http://127.0.0.1:9008/jsonSimStats/
27# and content == '"SimFPS":' for 4 cycles
28# then restart
29 depends on ROBUST
diff --git a/scripts/install/opensim.tmux.conf b/scripts/install/opensim.tmux.conf
index 84e0c21..1b4da52 100644
--- a/scripts/install/opensim.tmux.conf
+++ b/scripts/install/opensim.tmux.conf
@@ -5,7 +5,7 @@ set-option -g prefix C-a
5unbind-key C-b 5unbind-key C-b
6bind-key C-a send-prefix 6bind-key C-a send-prefix
7 7
8# r reloads the configuration, handy 8# r reloads the configuration, handy.
9bind r source-file ~/.tmux.conf 9bind r source-file ~/.tmux.conf
10 10
11bind R clear-history 11bind R clear-history
@@ -16,16 +16,31 @@ unbind '"'
16bind | split-window -h 16bind | split-window -h
17bind - split-window -v 17bind - split-window -v
18 18
19# pane border
20set -g pane-border-status top
21#colors for pane borders
22set-window-option -g pane-border-style fg=black,bg=green
23set-window-option -g pane-active-border-style fg=black,bg=red
24set-window-option -g automatic-rename off
25set-window-option -g pane-border-format '[#{pane_index}:#{pane_title}]'
26
27# select-pane -t 1 -T "fancy pane title"
28# Note that running a program in that tab might override it - 1 mc [dvs1@Superbitch]:/media/DATA/home/dvs1
29
19# set-options -g global, -s server, -w window, otherwise a session option. 30# set-options -g global, -s server, -w window, otherwise a session option.
20# -a appends a string to the existing option. 31# -a appends a string to the existing option.
21# -u unsets an option. 32# -u unsets an option.
22# -o prevents setting an aption if it is already set. 33# -o prevents setting an aption if it is already set.
23# -q shut up info messages. 34# -q shut up info messages.
24 35
36# SERVER OPTIONS
37
25# SESSION OPTIONS 38# SESSION OPTIONS
26 39
27set-option -g bell-action any 40set-option -g bell-action any
28set-option -g bell-on-alert on 41##set-option -g bell-on-alert on
42set-option -g visual-activity both
43set-option -g visual-bell both
29 44
30# Not actually documented what the limit is, but there is one. 45# Not actually documented what the limit is, but there is one.
31set-option -g history-limit 100000 46set-option -g history-limit 100000
@@ -46,7 +61,7 @@ set-option -g mouse on
46#set-option -g mouse 61#set-option -g mouse
47##set-option -g mouse-utf8 off # Defaults to on. 62##set-option -g mouse-utf8 off # Defaults to on.
48 63
49set-option -g set-remain-on-exit on 64###set-option -g set-remain-on-exit on
50 65
51# How to set the title of the terminal window. 66# How to set the title of the terminal window.
52set-option -g set-titles on 67set-option -g set-titles on
@@ -79,11 +94,15 @@ set-option -g status-right "%F #(uptime | cut -d ' ' -f 2-2,10-)" # %F is ISO da
79 94
80# Set window notifications 95# Set window notifications
81set-option -g visual-activity on # Show status message for activity in monitor-activity windows. 96set-option -g visual-activity on # Show status message for activity in monitor-activity windows.
82#set-option -g visual-content on # Show status message for content in monitor-content windows. Based on a fnmatch(3) string. 97#set-option -g visual-content on # Show status message for content in monitor-content windows. Based on a fnmatch(3) string.
83set-option -g visual-silence on # Show status message for silence in monitor-silence windows. Based on a set interval. 98set-option -g visual-silence on # Show status message for silence in monitor-silence windows. Based on a set interval.
84 99
85set-option -gw alternate-screen off # Don't save the original screen before starting tmux, may also allow use of the terminals original scrollback buffer. 100# WINDOW OPTIONS
101
86set-option -gw clock-mode-style 24 # We are using the uptime clock anyway, so this is pointless. 102set-option -gw clock-mode-style 24 # We are using the uptime clock anyway, so this is pointless.
103##set-option -gw mode-mouse on # on - mouse does copy mode stuff; copy-mode - mouse can't go into copy mode, but does stuff once in there; off - mouse is unmolested.
104
105set-option -gw monitor-activity on # Bell on activity.
87 106
88# Highlight active window 107# Highlight active window
89set-option -gw window-status-current-bg red 108set-option -gw window-status-current-bg red