Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Coordinated start/stop of VM/Docker thru User Scripts

Featured Replies

Would please somebody so kind and check these two script sniplets? I want to coordinate the Start and Stop of VMs and Dockers within a Start and Stop script. Is this how it should be done? Am I using the correct syntax and command options? Anything else I need to take into account?

 

I'm running additional Unraid arrays each in it's own VM. So the VMs need to be started first, I want to wait some time for them to complete. After that I want to create the required mount points and after that I want to start a docker.

 

Both scripts are User Scripts and applied to array start/stop.

 

May thanks in advance.

 

#!/bin/bash

# Start both VMs first
virsh start TowerVM01
virsh start TowerVM02

# Wait some time
sleep 5m

# Create base Mount Point
mkdir -p /mnt/hawi

# Create Mount Points for first VM
mkdir -p /mnt/hawi/192.168.178.101_disk1
# ...

# Create Mount Points for second VM
mkdir -p /mnt/hawi/192.168.178.102_disk1
# ...

# Mount Shares of first VM
mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,vers=3.0,username=hawi,password=****** '//192.168.178.101/disk1' '/mnt/hawi/192.168.178.101_disk1'
# ...

# Mount Shares of second VM
# mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,vers=3.0,username=hawi,password=****** '//192.168.178.102/disk1' '/mnt/hawi/192.168.178.102_disk1'

# Start Docker
docker start plex
#!/bin/bash

# Stop Docker
docker stop plex

# Unmount Shares of second VM
umount -l '/mnt/hawi/192.168.178.102_disk7'
# ...

# Unmount Shares of first VM
umount -l '/mnt/hawi/192.168.178.101_disk21'
# ...

# Remove Mount Points to second VM
rmdir '/mnt/hawi/192.168.178.102_disk7'
# ...

# Remove Mount Points to first VM
rmdir '/mnt/hawi/192.168.178.101_disk21'
# ...

# Remove base Mount Point
rmdir '/mnt/hawi'

# Stop VMs
virsh shutdown TowerVM02
virsh shutdown TowerVM01

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.