Packages/luci-app-usb-printer/root/etc/init.d/usb_printer
2024-12-04 10:15:35 +08:00

23 lines
328 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2005-2013 NowRush Studio
# Author: hackpascal <hackpascal@gmail.com>
START=70
stop() {
killall p910nd 2>/dev/null
}
start() {
for lps in `/usr/bin/detectlp`; do
product=`echo $lps | cut -d , -f 2`
/usr/bin/usb_printer_hotplug "$product" add
done
}
restart() {
stop
start
}