Hi all,
I'm a Windows admin (yeah, I know!) with a large Citrix user base. Up until recently we've used WinCE thin client devices, but I've just made the decision to move to Debian based HP ThinOS devices. One great feature of these is the ability to run scripts at startup by dropping them into an FTP folder for all the clients to read - the only problem being that I haven't a clue where to start with a Debian script.
What I'd like to do initially is to write the client's system specs (e.g. memory, processor, etc) and/or config (IP address, Citrix connections, etc) to a text file on a Windows fileserver. I already do this with Windows clients, so would like to keep it running. Currently, the text file is saved to a UNC path and uses the device's name, e.g. HP1234.txt
Would anybody be able to give me some pointers on how I start this off? Once I know how to build a basic script and write the file to a UNC path, I'm sure Google can help provide the rest.
Cheers
Andy
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Debian Startup Script
Re: Debian Startup Script
What sort of a script? A shell script?
Then make it executable.
Example:
Make it executable and run it
Plenty of documentation on BASH scripting:
http://tldp.org/LDP/abs/html/
I know nothing of Citrix and last I heard UNC was a school in North Carolina.
Code: Select all
#!/bin/bash
#Comment here
do something here
Code: Select all
chmod +x name_of_script.sh
Code: Select all
#!/bin/bash
echo "Yee Haw." #this is a comment
#this is also a comment
echo "files in this directory:"
ls -al
Code: Select all
chmod +x file_list.sh
./file_list.sh
http://tldp.org/LDP/abs/html/
I know nothing of Citrix and last I heard UNC was a school in North Carolina.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
Re: Debian Startup Script
Definitely not a daemon. Just a disposable script. If a daemon-like functionality is what you want consider cron or my preference anacron (man anacron) that can run anything at a specified interval. anacron/cron can call your script. Of course you can also call the script on boot or login.barriehie wrote:Are these scripts run once and then exit or are they daemons?
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
Re: Debian Startup Script
You may also find this script useful inxi - Project Hosting on Google Code
UNC paths depends on where you want to store the files. Normally to set up shares in Linux that are accessible from Windows you need to install and configure Samba. To access Windows shares from Debian (or any Linux system) install smbfs and see the man pages for mount.cifs. You may also find smbclient useful.
UNC paths depends on where you want to store the files. Normally to set up shares in Linux that are accessible from Windows you need to install and configure Samba. To access Windows shares from Debian (or any Linux system) install smbfs and see the man pages for mount.cifs. You may also find smbclient useful.
Re: Debian Startup Script
Hi guys
They are just to execute on startup. To my knowledge, the OS executes all script files that are located within a specific folder on the FTP site during boot.
I've had a quick nose at the links you've sent through, which I think will be all I need to get started, although setting up samba may be a no go unless the device already supports it. Using bash, how would I go about starting or checking if the smbfs service is running? Is there a command I can use to list files within a remote directory on a Windows file share?
Thanks very much everyone !
Cheers
Andy
They are just to execute on startup. To my knowledge, the OS executes all script files that are located within a specific folder on the FTP site during boot.
I've had a quick nose at the links you've sent through, which I think will be all I need to get started, although setting up samba may be a no go unless the device already supports it. Using bash, how would I go about starting or checking if the smbfs service is running? Is there a command I can use to list files within a remote directory on a Windows file share?
Thanks very much everyone !
Cheers
Andy
Re: Debian Startup Script
AndyWh wrote: Using bash, how would I go about starting or checking if the smbfs service is running?
Code: Select all
ps aux|grep mbd
Is there a command I can use to list files within a remote directory on a Windows file share?
Code: Select all
ls /path/to/share
Code: Select all
man ls
ls - list directory contents
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
Re: Debian Startup Script
Code: Select all
ps aux|grep mbd