]> Monitor SES-capable SCSI enclosures with sesmon, and configure it from a settings page: pick enclosures from the ones found on your server instead of typing SAS addresses. A fork of desertwitch's SCSI Enclosure Monitor for UNRAID. if [ -e /boot/config/plugins/dwsesmon.plg ] || [ -e /var/log/plugins/dwsesmon.plg ] || [ -d /usr/local/emhttp/plugins/dwsesmon ]; then echo "" echo "ERROR: the original SCSI Enclosure Monitor plugin (dwsesmon) is installed." echo "ERROR: Remove it first (Plugins tab), then install this plugin again." echo "ERROR: Your enclosure configuration is kept in /boot/config/plugins/dwsesmon/config/" echo "ERROR: and can be copied into the editor of this plugin afterwards." echo "" exit 1 fi exit 0 &pkgURL;/sesmon-0.1.1-x86_64-1.txz &sesmonSHA; &pkgURL;/sg3_utils-1.48-x86_64-2.txz &sg3SHA; &pluginURL; &sha256; echo "" killall sesmon >/dev/null 2>&1 if [ -x /etc/rc.d/rc.sesmon-ext ]; then if ! /etc/rc.d/rc.sesmon-ext stop >/dev/null 2>&1; then echo "WARNING:" echo "WARNING: The installation script was not able to stop the service." echo "WARNING: IN CASE OF PROBLEMS, please REBOOT YOUR SYSTEM to complete any upgrades." echo "WARNING:" fi fi # the previous package versions are not needed once this one is installed rm -f $(ls &plgPATH;/&name;-*.txz 2>/dev/null | grep -v "&version;") if [ -x &emhttp;/scripts/write_config ]; then &emhttp;/scripts/write_config fi if [ -x /etc/rc.d/rc.sesmon-ext ]; then source "&plgPATH;/&name;.cfg" if [ "$SERVICE" == "enable" ]; then echo "Starting service..." /etc/rc.d/rc.sesmon-ext start 2>&1 | logger -t "rc.sesmon-ext" if [ "${PIPESTATUS[0]}" -eq 0 ]; then echo "Service has been started successfully." else echo "WARNING: Service failed to start, check your configuration and the SYSLOG." fi fi fi echo "" echo "-------------------------------------------------------------" echo " SCSI Enclosure Monitor Extended has been installed." echo " Version: &version; / Plugin Maintainer: &author;" echo " Based on sesmon-unRAID by desertwitch." echo "-------------------------------------------------------------" echo "" echo "" killall sesmon >/dev/null 2>&1 if [ -x /etc/rc.d/rc.sesmon-ext ]; then if ! /etc/rc.d/rc.sesmon-ext stop >/dev/null 2>&1; then echo "WARNING:" echo "WARNING: The uninstallation script was not able to stop the service." echo "WARNING: IN CASE OF PROBLEMS, please REBOOT YOUR SYSTEM to remove any remaining packages." echo "WARNING:" fi fi rm -f &plgPATH;/sg3*.txz removepkg &plgPATH;/*.txz rm -f &plgPATH;/*.txz # Unraid does not forget the package on its own: without this, reinstalling the same # version before a reboot is skipped as "already installed" and installs nothing for pkg in /var/log/packages/&name;-*; do [ -e "$pkg" ] && removepkg "$(basename "$pkg")" >/dev/null 2>&1 done rm -f /etc/rc.d/rc.sesmon-ext /etc/logrotate.d/sesmon-ext rm -rf &emhttp; rm -rf /etc/sesmon-ext rm -rf /var/lib/sesmon-ext # your saved configuration in &plgPATH;/config is kept, so a reinstall picks up where you left off echo "" echo "-----------------------------------------------------------" echo " SCSI Enclosure Monitor Extended has been removed." echo " Version: &version;" echo "-----------------------------------------------------------" echo ""