2012年5月9日 星期三

[lighttpd][Samba][Embedded System][bash script] Enable lighttpd server && Enable samba

#!/bin/bash

do_command ProvSWT #open switch

ifconfig lan0 0.0.0.0

ifconfig eth0 192.168.100.1

/fss/gw/sbin/lighttpd -D -f /fss/gw/etc/lighttpd.conf &

# vi /etc/samba/smb.conf

sed 's/192.168.0.1\/255.255.255.0 192.168.100.1\/255.255.255.0/192.168.100.1\/255.255.255.0/g' /etc/samba/smb.conf > /etc/samba/1.conf

cp /etc/samba/1.conf /etc/samba/smb.conf

echo nobody:x:99:99:Nobody:/:/bin/sh >> /etc/passwd

/usr/sbin/nmbd -D

/usr/sbin/smbd -D

Related Posts:

0 意見:

張貼留言