You Are Here: Home » Posts tagged "Script"

Running Java applications as daemon on Linux

Recently I found the need to create an init.d script for a java app and since I had a hard time finding an example, I came up with this vim /usr/local/bin/myAPP-stop.sh vim /usr/local/bin/myAPP-start.sh vim /etc/init.d/myAPP chmod +x /usr/local/bin/myAPP-start.sh /usr/local/bin/myAPP-stop.sh /etc/init.d/myAPP update-rc.d myAPP defaults This script work perfectly under Ubuntu 12.04, but it should apply to ot ...

Read more

Script to auto restart your Modem

If you want to restart your modem and need to automate this process like I needed to, here is a script that connect via telnet and reboot your modem. Modem type: THOMSON ST605 #!/usr/bin/expect -f set timeout 20 # router user name set name "Administrator" # router password set pass "PassWord" # router IP address set routerip "X.X.X.X" # Read command as arg to this script #set routercmd [lindex $argv 0] set ...

Read more
Scroll to top