Page 1 of 1

Current /etc/wicd/postconnect/wirelessup script

Posted: Sun Feb 19, 2012 2:14 am
by koolb
I had mentioned I replaced NetworkManager with wicd for passwordless auto boot. I wanted to share my wicd script to ensure zm plus all the other key daemons were up and running. Note after installing wicd, to disable NetworkManager I did the following:

cd /etc/init.d; sudo mv network-manager network-mananger.disabled
cd /etc/xdg/autostart; sudo mv nm-applet.desktop ..

Note that while wicd is better all around, the only way I could connect to an older Open-key psa wireless network recently was to re-enable network-manager by moving the files above back into place and doing similar to /etc/init.d/wicd and /etc/xdg/autostart/wicd-tray.desktop

Anyways, heres my startup for wicd (once it connects it brings up the required services with this /etc/wicd/postconnect/homeup script:

I allow ssh in from anywhere in the world. ntp keeps my clock current vi /etc/ntp.conf:
# maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <>
server iburst
server iburst
server iburst
server iburst

# rc.local
# Start local services after hardware detection
for mnt in sda2 sdb1
do sudo fdisk -l | fgrep $mnt && mount | grep '^/dev/$mnt' > /dev/null || sudo mount /dev/$mnt
for dir in zm apache2
do [ -h /var/log/$dir ] || ln -s /media/sda2/Data/log/$dir /var/log/$dir
echo "$(date) Running local services...and checking for /dev/sda2" > /tmp/out
ls -l /media/sda2 >> /tmp/out
SERVICES="apache2 ssh mysql ntp zm cron"

for i in $SERVICES; do
[ -x /etc/init.d/"$i" ] && /etc/init.d/"$i" start >/dev/null 2>&1

exit 0