Skip to content

Instantly share code, notes, and snippets.

View vuolter's full-sized avatar
🍫

Walter Purcaro vuolter

🍫
View GitHub Profile
@vuolter
vuolter / gsreboot.sh
Last active September 28, 2024 07:58
Reboot Grandstream ATA
#!/opt/bin/bash
#
# gsreboot.sh v2.1 - Script to reboot Grandstream ATA
#
# @author: Walter Purcaro <[email protected]>
# @dependencies: bash coreutils-base64 curl grep logger sed
#
###############################################################################
name="$(basename "$0")[$$]"
@vuolter
vuolter / fixdate.bat
Last active August 29, 2015 14:07
Fix date time on device with bad cmos battery. Schedule it at system startup. Windows only.
::Date fixup v0.1 by Walter Purcaro <[email protected]>
@ECHO off
SET dummydate=02-10-2014 ::proper date to set
SET failyear=2000 ::wrong year shown on start
IF %date:~6% LEQ %failyear% (
DATE %dummydate%
"%windir%\system32\sc.exe" start w32time task_started
"%windir%\system32\w32tm.exe" /resync
)
@vuolter
vuolter / reconnect.sh
Last active August 29, 2015 14:03
Shell script for reconnect wan under Tomato firmware
#!/bin/sh
#
# reconnect.sh v0.2 - Reconnect WAN, for Tomato firmwares
# @author: Walter Purcaro <[email protected]>
#
###############################################################################
# Set to 1 if this script was put on its target machine, otherwise set it to 0 and configure all the following settings
ITSELF=1
@vuolter
vuolter / init.autostop
Last active August 29, 2015 14:01
Tomato init.autostop
#!/bin/sh
if [ -d /opt/etc/init.d ]
then
for f in /opt/etc/init.d/S*
do [ -x "$f" ] && $f stop
done
fi
@vuolter
vuolter / init.autorun
Last active August 29, 2015 14:01
Tomato init.autorun
#!/bin/sh
#
# init.autorun v0.3 - Another Tomato init.autorun
# @author: Walter Purcaro <[email protected]>
#
###############################################################################
sleep 300
# Load init daemons
@vuolter
vuolter / opkgupdater.sh
Last active October 7, 2016 09:33
OPKG Package Updater
#!/bin/sh
#
# Opkg Updater v1.4 - Update OPKG packages flawlessly
# @author: Walter Purcaro <[email protected]>
#
###############################################################################
VERSION="1.4"
trap 'echo Exiting...' INT TERM
@vuolter
vuolter / shutscsi.sh
Created March 22, 2014 22:37
Unmount and spin down all scsi devices
#!/bin/sh
#
# Shutscsi v0.1 - Unmount and spin down all scsi devices
# @author: Walter Purcaro <[email protected]>
#
###############################################################################
#
# This script needs fuser and sdparm softwares to run correctly.
# Install psmisc and sdparm packages to get them.
#