Cups Printer Pup 431

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
efiguy
Posts: 164
Joined: Thu 07 Sep 2006, 02:51

Cups Printer Pup 431

#1 Post by efiguy »

Hi all,

This thread is a continuation of a question started within forum post

[url]http://www.murga-linux.com/puppy/viewtopic.php?t=48175[/url]

Where, I noticed an unexpected ping to other networked machines from a Puppy 431 system and casually asked about it.
(with such swell response, desired to make it topic searchable)

Pizzasgood and big_bass
suggested a solution, and since we were in a Programing forum area, wanted to try and modify another script in '431

[url]http://www.linuxquestions.org/questions ... pp-382763/[/url]

The controls do operate as verified with PProcess viewer, as a process named -- /usr/sbin/cupsd -- will start and disappear

(I've never really programed anything, and this is a real hoot for me)

Thanks All
Jay

*************** A Control
[code]
#!/bin/bash
#
# Make base txt file "Print_N_Stop" and place into " /etc/init.d " Set
# Permissions to be "executable" Drag to Desktop
#
# FUNCTIONING CONTROL BUTTONS FOR A CUPS PRINTER PORT
# CONTROL
# BASE IDEA FROM "QUISP" CONTROL WITHIN HIAWATHA WEBSERVER
# ISO_431 large version
# Code from Hiawatha start/stop script for Linux
# (MODIFIED 11-26-09 jj)
# And from Pizzasgood and big_bass
# #[url]http://www.murga-linux.com/puppy/viewtopic.php?t=48175[/url]
# #[url]http://www.linuxquestions.org/questions ... pp-382763/[/url]
#
# Task was to stop a periodic Intranet probe from UDP port 631

PATH="/bin:/usr/bin:/sbin:/usr/sbin"
PRINTER="/etc/init.d/cups"
STOP="/etc/init.d/cups"

NORMAL="\033[0m"
RED="\033[00;31m"
YELLOW="\033[00;33m"
GREEN="\033[00;32m"

xmessage -center -bg 'orange' -buttons PRINTER:9,STOP:10,EXIT:11 -title "box" "
Click the 'PRINTER' button to START the CUPS printer system
If you want to STOP the Print Server and exit, click the 'STOP' button
To just quit, click the 'EXIT' button"

case $? in

9)
# !/bin/sh
# script name start_cups
# a quick fix for sever error big_bass
# /etc/init.d/cups start
exec /etc/init.d/cups start
exit
;;
10)
# !/bin/sh
# script name stop_cups
# a quick fix for sever error big_bass
# killall cupsd
# /etc/init.d/cups stop
exec /etc/init.d/cups stop

exit
;;
*)
exit
;;

esac
exit 0
###END###[/code]

[/url]

Post Reply