7 |
PLUGIN_MENUITEM_WORKDIR="" |
PLUGIN_MENUITEM_WORKDIR="" |
8 |
PLUGIN_MENUITEM_ICON="" |
PLUGIN_MENUITEM_ICON="" |
9 |
|
|
10 |
|
PLUGIN_AUTOSTART=0 |
11 |
|
|
12 |
PLUGIN_PACKAGES="openssl rdesktop" |
PLUGIN_PACKAGES="openssl rdesktop" |
13 |
|
|
14 |
install_plugin() |
install_plugin() |
26 |
|
|
27 |
setup_plugin() |
setup_plugin() |
28 |
{ |
{ |
29 |
|
if [ ! -f /etc/alxconfig-ng/plugin-${PLUGIN_NAME}.conf ] |
30 |
|
then |
31 |
|
install /usr/lib/alxconfig-ng/plugins/${PLUGIN_NAME}/plugin-${PLUGIN_NAME}.conf /etc/alxconfig-ng |
32 |
|
fi |
33 |
|
|
34 |
return 0 |
return 0 |
35 |
} |
} |
36 |
|
|
37 |
# create desktop buttons |
# create desktop buttons |
38 |
create_menuitem() |
create_menuitem() |
39 |
{ |
{ |
40 |
|
if [ -f /etc/alxconfig-ng/plugin-rdesktop.conf ] |
41 |
|
then |
42 |
|
source /etc/alxconfig-ng/plugin-rdesktop.conf |
43 |
|
fi |
44 |
|
[[ -z ${PLUGIN_CONFIG_PARAM} ]] && PLUGIN_CONFIG_PARAM="" |
45 |
|
[[ -z ${PLUGIN_CONFIG_SERVER} ]] && PLUGIN_CONFIG_SERVER="" |
46 |
|
|
47 |
# don't touch these echo, define variables above |
# don't touch these echo, define variables above |
48 |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
49 |
echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\"" |
echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\"" |
50 |
echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\"" |
echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_CONFIG_PARAM} ${PLUGIN_MENUITEM_PARAM} ${PLUGIN_CONFIG_SERVER}\"" |
51 |
echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\"" |
echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\"" |
52 |
echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\"" |
echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\"" |
53 |
} |
} |
54 |
|
|
55 |
|
autostart_plugin() |
56 |
|
{ |
57 |
|
echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\"" |
58 |
|
} |
59 |
|
|
60 |
uninstall_plugin() |
uninstall_plugin() |
61 |
{ |
{ |
62 |
local i |
local i |
77 |
setup) setup_plugin ;; |
setup) setup_plugin ;; |
78 |
menuitem) create_menuitem ;; |
menuitem) create_menuitem ;; |
79 |
uninstall) uninstall_plugin ;; |
uninstall) uninstall_plugin ;; |
80 |
|
autostart) autostart_plugin ;; |
81 |
*) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;; |
*) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;; |
82 |
esac |
esac |