1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
5 DAEMON
=/usr
/sbin
/imspector
6 CFGFILE
=/var
/etc
/imspector.conf
10 config_foreach start_imspector imspector
14 start-stop-daemon
-q -x "$DAEMON" -K
25 config_get_bool
enable "$1" enable
26 [ "$enable" -eq "1" ] ||
return 0
28 echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE
29 echo '### DO NOT EDIT' >> $CFGFILE
30 echo '### SEE /etc/config/imspector INSTEAD' >> $CFGFILE
33 imspector_options
='listenaddr port http_port pidfilename plugin_dir
34 user group ssl ssl_key ssl_cert icq_protocol irc_protocol
35 msn_protocol yahoo_protocol gg_protocol jabber_protocol
36 https_protocol log_typing_events file_logging_dir
37 badwords_filename badwords_replace_character badwords_block_count
38 acl_filename db_filter_filename block_unlisted block_files block_webcams
39 mysql_server mysql_database mysql_username mysql_password
40 sqlite_file pgsql_connect censord'
43 for option
in $imspector_options; do
44 imspector_atom
"$1" "$option" '"' >> $CFGFILE
48 start-stop-daemon
-S -q -x "$DAEMON" -- -c "$CFGFILE"
55 config_get _value
"$SECTION" "$OPTION"
56 [ -n "$_value" -o "$EMPTY_DISABLED" -eq "1" ] && {
57 echo "$OPTION=${_value}"