This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------------------------------------------------------ | |
# | |
# Darkhand's print spooler tools v5.0 | |
# | |
# Use this to remotely query or restart the print spooler of a given machine. Also can reboot the machine remotely (untested). | |
# | |
# ------------------------------------------------------------------------------------------------------------------------------ | |
# | |
# | |
# Changes in v5.0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:query | |
echo: | |
set /P machine="Enter machine name to query: " | |
Rem Make sure the system exists on the network | |
sc \\%machine% query spooler | find /I "FAILED">nul | |
if "%errorlevel%"=="1" ( | |
goto :lookup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:query | |
Rem Look for the Print Spooler service in the list of started services | |
sc query spooler | find /I "STATE" | find "RUNNING">nul | |
Rem if not found, start it and a restart occurred. | |
if "%errorlevel%"=="1" ( | |
echo Service "Print Spooler" restarted at %time% on %date% by Script %0>>ServiceRestart.Log | |
sc start spooler>nul | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--Window well pump controller-- | |
This Arduino sketch controls the pumps in the basement window wells. | |
Operation: | |
Each window well has its own pump and float sensor. When a sensor is | |
triggered, its pump activates. When the sensor clears, a timer starts | |
and the pump continues to run for the duration defined in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------------ | |
# PiKeeper sync disable script | |
# This file should typically be placed in: | |
# /etc/smartmontools/run.d/ | |
# ------------------------------------------------ | |
# Configuration: |