Browse Source

Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/.

master
Jared Dunbar 3 years ago
parent
commit
e55692f52d
Signed by: jared GPG Key ID: CF202CC859BAC692
  1. 15
      README.md
  2. 480
      all_addrs
  3. 506
      all_addrs2
  4. 25
      all_addrs_no_presenter
  5. 2
      run.sh
  6. 2
      runkill.sh
  7. 0
      subcommand/batch.sh
  8. 0
      subcommand/kill.sh
  9. 0
      subcommand/start_drizzle.sh
  10. 0
      subcommand/start_itl_chorus.sh
  11. 0
      subcommand/test_itl.sh
  12. 0
      subcommand/turn_on_monitors.sh
  13. 8
      ziltoid-scripts/copy-to-linux.sh
  14. 8
      ziltoid-scripts/download-linux.sh
  15. 10
      ziltoid-scripts/echo-linux.sh
  16. 8
      ziltoid-scripts/install-linux.sh
  17. 9
      ziltoid-scripts/linux-reboot.sh
  18. 10
      ziltoid-scripts/linux-to-windows.sh
  19. 9
      ziltoid-scripts/shutdown-linux.sh
  20. 9
      ziltoid-scripts/shutdown-windows.sh
  21. 8
      ziltoid-scripts/wake-linux.sh
  22. 9
      ziltoid-scripts/windows-to-linux.sh

15
README.md

@ -7,7 +7,7 @@ Requirements:
Operation:
1. Edit `batch.sh` to reflect what you want to run.
2. Ensure `all_addrs` has all potential addresses of all machines (usually an entire DHCP range)
2. Ensure `all_addrs` has all potential addresses of all machines (144.40 - 144.65 for ITL, 144.21 - 144.28 for COSI)
3. Run `./run.sh` with two arguments: the username, and the password.
4. Profit!
@ -20,3 +20,16 @@ Note that `run.sh` invokes `ssh` via `sshpass`, and so respects your local confi
`all_addrs` usually contains IP addresses, but may also contain hostnames, or, really, anything acceptable past '@' in your version of ssh.
As of this version, passwords are passed in the environment, so take care as to who can debug your programs; it should be more resistant to casual snooping, however.
## Sub-directories
* subcommand: Complete shell scripts ready to be run
* ziltoid-scripts: Complete set of shell scripts designed for ITL administration by xperia64. By design, they use SSH keys.
## Other notes
`all_addrs` has been reduced to contain all of the ITL addresses.
`all_addrs_no_presenter` is the same as the above one, except it excludes 144.40 which is the front projector presenter machine.
**TODO:** In the future, it would make sense to make a little script to select some hosts from a list of [itl, itl_wo_presenter, cosi, all] and dump it into use_addr or something.

480
all_addrs

@ -1,41 +1,3 @@
128.153.144.2
128.153.144.3
128.153.144.4
128.153.144.5
128.153.144.6
128.153.144.7
128.153.144.8
128.153.144.9
128.153.144.10
128.153.144.11
128.153.144.12
128.153.144.13
128.153.144.14
128.153.144.15
128.153.144.16
128.153.144.17
128.153.144.18
128.153.144.19
128.153.144.20
128.153.144.21
128.153.144.22
128.153.144.23
128.153.144.24
128.153.144.25
128.153.144.26
128.153.144.27
128.153.144.28
128.153.144.29
128.153.144.30
128.153.144.31
128.153.144.32
128.153.144.33
128.153.144.34
128.153.144.35
128.153.144.36
128.153.144.37
128.153.144.38
128.153.144.39
128.153.144.40
128.153.144.41
128.153.144.42
@ -62,445 +24,3 @@
128.153.144.63
128.153.144.64
128.153.144.65
128.153.144.66
128.153.144.67
128.153.144.68
128.153.144.69
128.153.144.70
128.153.144.71
128.153.144.72
128.153.144.73
128.153.144.74
128.153.144.75
128.153.144.76
128.153.144.77
128.153.144.78
128.153.144.79
128.153.144.80
128.153.144.81
128.153.144.82
128.153.144.83
128.153.144.84
128.153.144.85
128.153.144.86
128.153.144.87
128.153.144.88
128.153.144.89
128.153.144.90
128.153.144.91
128.153.144.92
128.153.144.93
128.153.144.94
128.153.144.95
128.153.144.96
128.153.144.97
128.153.144.98
128.153.144.99
128.153.144.100
128.153.144.101
128.153.144.102
128.153.144.103
128.153.144.104
128.153.144.105
128.153.144.106
128.153.144.107
128.153.144.108
128.153.144.109
128.153.144.110
128.153.144.111
128.153.144.112
128.153.144.113
128.153.144.114
128.153.144.115
128.153.144.116
128.153.144.117
128.153.144.118
128.153.144.119
128.153.144.120
128.153.144.121
128.153.144.122
128.153.144.123
128.153.144.124
128.153.144.125
128.153.144.126
128.153.144.127
128.153.144.128
128.153.144.129
128.153.144.130
128.153.144.131
128.153.144.132
128.153.144.133
128.153.144.134
128.153.144.135
128.153.144.136
128.153.144.137
128.153.144.138
128.153.144.139
128.153.144.140
128.153.144.141
128.153.144.142
128.153.144.143
128.153.144.144
128.153.144.145
128.153.144.146
128.153.144.147
128.153.144.148
128.153.144.149
128.153.144.150
128.153.144.151
128.153.144.152
128.153.144.153
128.153.144.154
128.153.144.155
128.153.144.156
128.153.144.157
128.153.144.158
128.153.144.159
128.153.144.160
128.153.144.161
128.153.144.162
128.153.144.163
128.153.144.164
128.153.144.165
128.153.144.166
128.153.144.167
128.153.144.168
128.153.144.169
128.153.144.170
128.153.144.171
128.153.144.172
128.153.144.173
128.153.144.174
128.153.144.175
128.153.144.176
128.153.144.177
128.153.144.178
128.153.144.179
128.153.144.180
128.153.144.181
128.153.144.182
128.153.144.183
128.153.144.184
128.153.144.185
128.153.144.186
128.153.144.187
128.153.144.188
128.153.144.189
128.153.144.190
128.153.144.191
128.153.144.192
128.153.144.193
128.153.144.194
128.153.144.195
128.153.144.196
128.153.144.197
128.153.144.198
128.153.144.199
128.153.144.200
128.153.144.201
128.153.144.202
128.153.144.203
128.153.144.204
128.153.144.205
128.153.144.206
128.153.144.207
128.153.144.208
128.153.144.209
128.153.144.210
128.153.144.211
128.153.144.212
128.153.144.213
128.153.144.214
128.153.144.215
128.153.144.216
128.153.144.217
128.153.144.218
128.153.144.219
128.153.144.220
128.153.144.221
128.153.144.222
128.153.144.223
128.153.144.224
128.153.144.225
128.153.144.226
128.153.144.227
128.153.144.228
128.153.144.229
128.153.144.230
128.153.144.231
128.153.144.232
128.153.144.233
128.153.144.234
128.153.144.235
128.153.144.236
128.153.144.237
128.153.144.238
128.153.144.239
128.153.144.240
128.153.144.241
128.153.144.242
128.153.144.243
128.153.144.244
128.153.144.245
128.153.144.246
128.153.144.247
128.153.144.248
128.153.144.249
128.153.144.250
128.153.144.251
128.153.144.252
128.153.144.253
128.153.144.254
128.153.145.2
128.153.145.3
128.153.145.4
128.153.145.5
128.153.145.6
128.153.145.7
128.153.145.8
128.153.145.9
128.153.145.10
128.153.145.11
128.153.145.12
128.153.145.13
128.153.145.14
128.153.145.15
128.153.145.16
128.153.145.17
128.153.145.18
128.153.145.19
128.153.145.20
128.153.145.21
128.153.145.22
128.153.145.23
128.153.145.24
128.153.145.25
128.153.145.26
128.153.145.27
128.153.145.28
128.153.145.29
128.153.145.30
128.153.145.31
128.153.145.32
128.153.145.33
128.153.145.34
128.153.145.35
128.153.145.36
128.153.145.37
128.153.145.38
128.153.145.39
128.153.145.40
128.153.145.41
128.153.145.42
128.153.145.43
128.153.145.44
128.153.145.45
128.153.145.46
128.153.145.47
128.153.145.48
128.153.145.49
128.153.145.50
128.153.145.51
128.153.145.52
128.153.145.53
128.153.145.54
128.153.145.55
128.153.145.56
128.153.145.57
128.153.145.58
128.153.145.59
128.153.145.60
128.153.145.61
128.153.145.62
128.153.145.63
128.153.145.64
128.153.145.65
128.153.145.66
128.153.145.67
128.153.145.68
128.153.145.69
128.153.145.70
128.153.145.71
128.153.145.72
128.153.145.73
128.153.145.74
128.153.145.75
128.153.145.76
128.153.145.77
128.153.145.78
128.153.145.79
128.153.145.80
128.153.145.81
128.153.145.82
128.153.145.83
128.153.145.84
128.153.145.85
128.153.145.86
128.153.145.87
128.153.145.88
128.153.145.89
128.153.145.90
128.153.145.91
128.153.145.92
128.153.145.93
128.153.145.94
128.153.145.95
128.153.145.96
128.153.145.97
128.153.145.98
128.153.145.99
128.153.145.100
128.153.145.101
128.153.145.102
128.153.145.103
128.153.145.104
128.153.145.105
128.153.145.106
128.153.145.107
128.153.145.108
128.153.145.109
128.153.145.110
128.153.145.111
128.153.145.112
128.153.145.113
128.153.145.114
128.153.145.115
128.153.145.116
128.153.145.117
128.153.145.118
128.153.145.119
128.153.145.120
128.153.145.121
128.153.145.122
128.153.145.123
128.153.145.124
128.153.145.125
128.153.145.126
128.153.145.127
128.153.145.128
128.153.145.129
128.153.145.130
128.153.145.131
128.153.145.132
128.153.145.133
128.153.145.134
128.153.145.135
128.153.145.136
128.153.145.137
128.153.145.138
128.153.145.139
128.153.145.140
128.153.145.141
128.153.145.142
128.153.145.143
128.153.145.144
128.153.145.145
128.153.145.146
128.153.145.147
128.153.145.148
128.153.145.149
128.153.145.150
128.153.145.151
128.153.145.152
128.153.145.153
128.153.145.154
128.153.145.155
128.153.145.156
128.153.145.157
128.153.145.158
128.153.145.159
128.153.145.160
128.153.145.161
128.153.145.162
128.153.145.163
128.153.145.164
128.153.145.165
128.153.145.166
128.153.145.167
128.153.145.168
128.153.145.169
128.153.145.170
128.153.145.171
128.153.145.172
128.153.145.173
128.153.145.174
128.153.145.175
128.153.145.176
128.153.145.177
128.153.145.178
128.153.145.179
128.153.145.180
128.153.145.181
128.153.145.182
128.153.145.183
128.153.145.184
128.153.145.185
128.153.145.186
128.153.145.187
128.153.145.188
128.153.145.189
128.153.145.190
128.153.145.191
128.153.145.192
128.153.145.193
128.153.145.194
128.153.145.195
128.153.145.196
128.153.145.197
128.153.145.198
128.153.145.199
128.153.145.200
128.153.145.201
128.153.145.202
128.153.145.203
128.153.145.204
128.153.145.205
128.153.145.206
128.153.145.207
128.153.145.208
128.153.145.209
128.153.145.210
128.153.145.211
128.153.145.212
128.153.145.213
128.153.145.214
128.153.145.215
128.153.145.216
128.153.145.217
128.153.145.218
128.153.145.219
128.153.145.220
128.153.145.221
128.153.145.222
128.153.145.223
128.153.145.224
128.153.145.225
128.153.145.226
128.153.145.227
128.153.145.228
128.153.145.229
128.153.145.230
128.153.145.231
128.153.145.232
128.153.145.233
128.153.145.234
128.153.145.235
128.153.145.236
128.153.145.237
128.153.145.238
128.153.145.239
128.153.145.240
128.153.145.241
128.153.145.242
128.153.145.243
128.153.145.244
128.153.145.245
128.153.145.246
128.153.145.247
128.153.145.248
128.153.145.249
128.153.145.250
128.153.145.251
128.153.145.252
128.153.145.253
128.153.145.254

506
all_addrs2

@ -1,506 +0,0 @@
128.153.144.2
128.153.144.3
128.153.144.4
128.153.144.5
128.153.144.6
128.153.144.7
128.153.144.8
128.153.144.9
128.153.144.10
128.153.144.11
128.153.144.12
128.153.144.13
128.153.144.14
128.153.144.15
128.153.144.16
128.153.144.17
128.153.144.18
128.153.144.19
128.153.144.20
128.153.144.21
128.153.144.22
128.153.144.23
128.153.144.24
128.153.144.25
128.153.144.26
128.153.144.27
128.153.144.28
128.153.144.29
128.153.144.30
128.153.144.31
128.153.144.32
128.153.144.33
128.153.144.34
128.153.144.35
128.153.144.36
128.153.144.37
128.153.144.38
128.153.144.39
128.153.144.40
128.153.144.41
128.153.144.42
128.153.144.43
128.153.144.44
128.153.144.45
128.153.144.46
128.153.144.47
128.153.144.48
128.153.144.49
128.153.144.50
128.153.144.51
128.153.144.52
128.153.144.53
128.153.144.54
128.153.144.55
128.153.144.56
128.153.144.57
128.153.144.58
128.153.144.59
128.153.144.60
128.153.144.61
128.153.144.62
128.153.144.63
128.153.144.64
128.153.144.65
128.153.144.66
128.153.144.67
128.153.144.68
128.153.144.69
128.153.144.70
128.153.144.71
128.153.144.72
128.153.144.73
128.153.144.74
128.153.144.75
128.153.144.76
128.153.144.77
128.153.144.78
128.153.144.79
128.153.144.80
128.153.144.81
128.153.144.82
128.153.144.83
128.153.144.84
128.153.144.85
128.153.144.86
128.153.144.87
128.153.144.88
128.153.144.89
128.153.144.90
128.153.144.91
128.153.144.92
128.153.144.93
128.153.144.94
128.153.144.95
128.153.144.96
128.153.144.97
128.153.144.98
128.153.144.99
128.153.144.100
128.153.144.101
128.153.144.102
128.153.144.103
128.153.144.104
128.153.144.105
128.153.144.106
128.153.144.107
128.153.144.108
128.153.144.109
128.153.144.110
128.153.144.111
128.153.144.112
128.153.144.113
128.153.144.114
128.153.144.115
128.153.144.116
128.153.144.117
128.153.144.118
128.153.144.119
128.153.144.120
128.153.144.121
128.153.144.122
128.153.144.123
128.153.144.124
128.153.144.125
128.153.144.126
128.153.144.127
128.153.144.128
128.153.144.129
128.153.144.130
128.153.144.131
128.153.144.132
128.153.144.133
128.153.144.134
128.153.144.135
128.153.144.136
128.153.144.137
128.153.144.138
128.153.144.139
128.153.144.140
128.153.144.141
128.153.144.142
128.153.144.143
128.153.144.144
128.153.144.145
128.153.144.146
128.153.144.147
128.153.144.148
128.153.144.149
128.153.144.150
128.153.144.151
128.153.144.152
128.153.144.153
128.153.144.154
128.153.144.155
128.153.144.156
128.153.144.157
128.153.144.158
128.153.144.159
128.153.144.160
128.153.144.161
128.153.144.162
128.153.144.163
128.153.144.164
128.153.144.165
128.153.144.166
128.153.144.167
128.153.144.168
128.153.144.169
128.153.144.170
128.153.144.171
128.153.144.172
128.153.144.173
128.153.144.174
128.153.144.175
128.153.144.176
128.153.144.177
128.153.144.178
128.153.144.179
128.153.144.180
128.153.144.181
128.153.144.182
128.153.144.183
128.153.144.184
128.153.144.185
128.153.144.186
128.153.144.187
128.153.144.188
128.153.144.189
128.153.144.190
128.153.144.191
128.153.144.192
128.153.144.193
128.153.144.194
128.153.144.195
128.153.144.196
128.153.144.197
128.153.144.198
128.153.144.199
128.153.144.200
128.153.144.201
128.153.144.202
128.153.144.203
128.153.144.204
128.153.144.205
128.153.144.206
128.153.144.207
128.153.144.208
128.153.144.209
128.153.144.210
128.153.144.211
128.153.144.212
128.153.144.213
128.153.144.214
128.153.144.215
128.153.144.216
128.153.144.217
128.153.144.218
128.153.144.219
128.153.144.220
128.153.144.221
128.153.144.222
128.153.144.223
128.153.144.224
128.153.144.225
128.153.144.226
128.153.144.227
128.153.144.228
128.153.144.229
128.153.144.230
128.153.144.231
128.153.144.232
128.153.144.233
128.153.144.234
128.153.144.235
128.153.144.236
128.153.144.237
128.153.144.238
128.153.144.239
128.153.144.240
128.153.144.241
128.153.144.242
128.153.144.243
128.153.144.244
128.153.144.245
128.153.144.246
128.153.144.247
128.153.144.248
128.153.144.249
128.153.144.250
128.153.144.251
128.153.144.252
128.153.144.253
128.153.144.254
128.153.145.2
128.153.145.3
128.153.145.4
128.153.145.5
128.153.145.6
128.153.145.7
128.153.145.8
128.153.145.9
128.153.145.10
128.153.145.11
128.153.145.12
128.153.145.13
128.153.145.14
128.153.145.15
128.153.145.16
128.153.145.17
128.153.145.18
128.153.145.19
128.153.145.20
128.153.145.21
128.153.145.22
128.153.145.23
128.153.145.24
128.153.145.25
128.153.145.26
128.153.145.27
128.153.145.28
128.153.145.29
128.153.145.30
128.153.145.31
128.153.145.32
128.153.145.33
128.153.145.34
128.153.145.35
128.153.145.36
128.153.145.37
128.153.145.38
128.153.145.39
128.153.145.40
128.153.145.41
128.153.145.42
128.153.145.43
128.153.145.44
128.153.145.45
128.153.145.46
128.153.145.47
128.153.145.48
128.153.145.49
128.153.145.50
128.153.145.51
128.153.145.52
128.153.145.53
128.153.145.54
128.153.145.55
128.153.145.56
128.153.145.57
128.153.145.58
128.153.145.59
128.153.145.60
128.153.145.61
128.153.145.62
128.153.145.63
128.153.145.64
128.153.145.65
128.153.145.66
128.153.145.67
128.153.145.68
128.153.145.69
128.153.145.70
128.153.145.71
128.153.145.72
128.153.145.73
128.153.145.74
128.153.145.75
128.153.145.76
128.153.145.77
128.153.145.78
128.153.145.79
128.153.145.80
128.153.145.81
128.153.145.82
128.153.145.83
128.153.145.84
128.153.145.85
128.153.145.86
128.153.145.87
128.153.145.88
128.153.145.89
128.153.145.90
128.153.145.91
128.153.145.92
128.153.145.93
128.153.145.94
128.153.145.95
128.153.145.96
128.153.145.97
128.153.145.98
128.153.145.99
128.153.145.100
128.153.145.101
128.153.145.102
128.153.145.103
128.153.145.104
128.153.145.105
128.153.145.106
128.153.145.107
128.153.145.108
128.153.145.109
128.153.145.110
128.153.145.111
128.153.145.112
128.153.145.113
128.153.145.114
128.153.145.115
128.153.145.116
128.153.145.117
128.153.145.118
128.153.145.119
128.153.145.120
128.153.145.121
128.153.145.122
128.153.145.123
128.153.145.124
128.153.145.125
128.153.145.126
128.153.145.127
128.153.145.128
128.153.145.129
128.153.145.130
128.153.145.131
128.153.145.132
128.153.145.133
128.153.145.134
128.153.145.135
128.153.145.136
128.153.145.137
128.153.145.138
128.153.145.139
128.153.145.140
128.153.145.141
128.153.145.142
128.153.145.143
128.153.145.144
128.153.145.145
128.153.145.146
128.153.145.147
128.153.145.148
128.153.145.149
128.153.145.150
128.153.145.151
128.153.145.152
128.153.145.153
128.153.145.154
128.153.145.155
128.153.145.156
128.153.145.157
128.153.145.158
128.153.145.159
128.153.145.160
128.153.145.161
128.153.145.162
128.153.145.163
128.153.145.164
128.153.145.165
128.153.145.166
128.153.145.167
128.153.145.168
128.153.145.169
128.153.145.170
128.153.145.171
128.153.145.172
128.153.145.173
128.153.145.174
128.153.145.175
128.153.145.176
128.153.145.177
128.153.145.178
128.153.145.179
128.153.145.180
128.153.145.181
128.153.145.182
128.153.145.183
128.153.145.184
128.153.145.185
128.153.145.186
128.153.145.187
128.153.145.188
128.153.145.189
128.153.145.190
128.153.145.191
128.153.145.192
128.153.145.193
128.153.145.194
128.153.145.195
128.153.145.196
128.153.145.197
128.153.145.198
128.153.145.199
128.153.145.200
128.153.145.201
128.153.145.202
128.153.145.203
128.153.145.204
128.153.145.205
128.153.145.206
128.153.145.207
128.153.145.208
128.153.145.209
128.153.145.210
128.153.145.211
128.153.145.212
128.153.145.213
128.153.145.214
128.153.145.215
128.153.145.216
128.153.145.217
128.153.145.218
128.153.145.219
128.153.145.220
128.153.145.221
128.153.145.222
128.153.145.223
128.153.145.224
128.153.145.225
128.153.145.226
128.153.145.227
128.153.145.228
128.153.145.229
128.153.145.230
128.153.145.231
128.153.145.232
128.153.145.233
128.153.145.234
128.153.145.235
128.153.145.236
128.153.145.237
128.153.145.238
128.153.145.239
128.153.145.240
128.153.145.241
128.153.145.242
128.153.145.243
128.153.145.244
128.153.145.245
128.153.145.246
128.153.145.247
128.153.145.248
128.153.145.249
128.153.145.250
128.153.145.251
128.153.145.252
128.153.145.253
128.153.145.254

25
all_addrs_no_presenter

@ -0,0 +1,25 @@
128.153.144.41
128.153.144.42
128.153.144.43
128.153.144.44
128.153.144.45
128.153.144.46
128.153.144.47
128.153.144.48
128.153.144.49
128.153.144.50
128.153.144.51
128.153.144.52
128.153.144.53
128.153.144.54
128.153.144.55
128.153.144.56
128.153.144.57
128.153.144.58
128.153.144.59
128.153.144.60
128.153.144.61
128.153.144.62
128.153.144.63
128.153.144.64
128.153.144.65

2
run.sh

@ -1,6 +1,6 @@
#!/bin/bash
command="$(cat batch.sh)"
command="$(cat subcommand/batch.sh)"
while read host opt_user opt_pwd; do
user="${opt_user:-$1}"

2
runkill.sh

@ -1,6 +1,6 @@
#!/bin/bash
command="$(cat kill.sh)"
command="$(cat subcommand/kill.sh)"
for host in $(cat all_addrs); do
sshpass -p"$2" ssh "${1}@${host}" -p 13699 -o StrictHostKeyChecking=no -o PubkeyAuthentication=no "$command" 2>> /tmp/batch_errors &

0
batch.sh → subcommand/batch.sh

0
kill.sh → subcommand/kill.sh

0
start_drizzle.sh → subcommand/start_drizzle.sh

0
start_itl_chorus.sh → subcommand/start_itl_chorus.sh

0
test_itl.sh → subcommand/test_itl.sh

0
turn_on_monitors.sh → subcommand/turn_on_monitors.sh

8
ziltoid-scripts/copy-to-linux.sh

@ -0,0 +1,8 @@
#!/bin/bash
# I have no idea what the fuck this does.
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
scp -P 13699 $2 "${user}@${host}$3" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 &
done

8
ziltoid-scripts/download-linux.sh

@ -0,0 +1,8 @@
#!/bin/bash
# I wrote this script to download files to an ITL machine.
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "cd /tmp; wget http://mirror.clarkson.edu/ignitecs/RAID-lab.7z; chown csguest: RAID-lab.7z" &
done

10
ziltoid-scripts/echo-linux.sh

@ -0,0 +1,10 @@
#!/bin/bash
# this script echos the IP addresses of computers that responded
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "ip -4 a show eno1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'" 2> /dev/null &
done
sleep 1

8
ziltoid-scripts/install-linux.sh

@ -0,0 +1,8 @@
#!/bin/bash
# This script installs software on the ITL machines using apt
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo apt -y install libreadline-dev" &
done

9
ziltoid-scripts/linux-reboot.sh

@ -0,0 +1,9 @@
#!/bin/bash
# This command reboots Linux hosts
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo reboot" &
#ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /r /f"
done

10
ziltoid-scripts/linux-to-windows.sh

@ -0,0 +1,10 @@
#!/bin/bash
# This script reboots Linux machines into Windows.
# It does this by affecting the boot order of the Windows partition to be first (which is temporary for the next run only, after that it will resume defaulting to Linux if configured correctly)
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo grub-reboot 'Windows Boot Manager (on /dev/sda2)'; sudo reboot" &
#ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /r /f"
done

9
ziltoid-scripts/shutdown-linux.sh

@ -0,0 +1,9 @@
#!/bin/bash
# This shuts down Linux hosts
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo poweroff" &
# ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /s /f"
done

9
ziltoid-scripts/shutdown-windows.sh

@ -0,0 +1,9 @@
#!/bin/bash
# This shuts down Windows hosts
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
# ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo grub-reboot 'Windows Boot Manager (on /dev/sda2)'; sudo reboot" &
ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /s /f"
done

8
ziltoid-scripts/wake-linux.sh

@ -0,0 +1,8 @@
#!/bin/bash
# This wakes the screens of Linux hosts
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo xset -display dpms force on" &
done

9
ziltoid-scripts/windows-to-linux.sh

@ -0,0 +1,9 @@
#!/bin/bash
# This script reboots Windows machines, which will result in GRUB selecting Linux and booting into Linux.
for host in $(cat good_hosts); do
user="${opt_user:-$1}"
# ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo grub-reboot 'Windows Boot Manager (on /dev/sda2)'; sudo reboot" &
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /r /f"
done
Loading…
Cancel
Save