Current /etc/wicd/postconnect/wirelessup script

Forum for questions and support relating to the 1.25.x releases only.
Locked
koolb
Posts: 14
Joined: Tue Oct 04, 2011 3:30 am

Current /etc/wicd/postconnect/wirelessup script

Post 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:
# pool.ntp.org 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: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

/etc/wicd/postconnect/wirelessup
#!/bin/bash
#
# 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
done
for dir in zm apache2
do [ -h /var/log/$dir ] || ln -s /media/sda2/Data/log/$dir /var/log/$dir
done
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
done

exit 0
Locked