Hi there
Im trying to get a script running under slackware, ive modified it so it should work, however parts of it do, and parts of it dont
Code:
#!/usr/bin/env wish
set sshcommand "/etc/rc.d/rc.sshd";
global sshcommand;
proc sshstart {} {
global $sshcommand start &;
}
proc sshstop {} {
global sshcommand;
exec $sshcommand stop &;
}
proc launchbrowser {} { exec firefox &;}
proc launcheditor {} { exec pico &; }
frame .app -borderwidth 10;
.app configure -background lightblue;
pack .app;
button .app.ssh-go -text "Start SSHD" -command sshstart;
button .app.ssh-end -text "Stop SSHD" -command sshstop;
button .app.browser -text "Web Browser" -command launchbrowser;
button .app.launcheditor -text "Text Editor" -command launcheditor;
.app.ssh-go configure -foreground green;
.app.ssh-end configure -foreground red;
pack .app.ssh-go .app.ssh-end .app.browser .app.launcheditor;
When run as root, the Stop SSHD part works, but the Start SSHD doesnt, both the firefox and pico launcher work as well.
Also, how do i stop the services running at startup, i want to be able to start the services once the system is running, as it will be (eventually) deployed ona laptop, so i will extend it to include other scripts, i just dont want it to spend ages looking for an ip via dhcp if its not connected to the network, and when it is connected i just want to press "Start Network"
Thanks in advance for any help!