slitaz-tools rev 546
serverbox: add mail servers
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 07 12:08:47 2011 +0100 (2011-02-07) |
parents | c2eeac9343bf |
children | eb7469a8467f |
files | tinyutils/serverbox |
line diff
1.1 --- a/tinyutils/serverbox Mon Feb 07 10:19:33 2011 +0100 1.2 +++ b/tinyutils/serverbox Mon Feb 07 12:08:47 2011 +0100 1.3 @@ -23,9 +23,12 @@ 1.4 tab_status_servers() 1.5 { 1.6 local servers 1.7 -servers="dropbear sshd inetd dhcpd dnsd named rsync httpd mbd vnc pppd knock" 1.8 +servers="dropbear sshd inetd dhcpd dnsd named rsync httpd mbd vnc pppd knock postfix fetchmail cyrus perdition slapd sql squid" 1.9 cat <<EOT 1.10 <frame Servers> 1.11 + <text use-markup="true"> 1.12 + <label>"<b>Running servers :</b>"</label> 1.13 + </text> 1.14 <text wrap="false" width-chars="58"> 1.15 <input>for i in $servers; do ps ww | grep \$i | grep -v grep | fold -s; done</input> 1.16 </text> 1.17 @@ -403,6 +406,224 @@ 1.18 } 1.19 1.20 # 1.21 +# Postfix 1.22 +# 1.23 +tab_postfix() 1.24 +{ 1.25 +cat <<EOT 1.26 + <frame Postfix> 1.27 +$(webbutton postfix) 1.28 +$(configfile /etc/postfix/main.cf POSTFIX_CONF) 1.29 + <hbox> 1.30 + $(startstopdaemon postfix) 1.31 + </hbox> 1.32 + </frame> 1.33 +EOT 1.34 +} 1.35 + 1.36 +# 1.37 +# Fetchmail 1.38 +# 1.39 +tab_fetchmail() 1.40 +{ 1.41 +cat <<EOT 1.42 + <frame Fetchmail> 1.43 +$(webbutton fetchmail) 1.44 +$(helpdaemon fetchmail 100x34 FETCHMAIL_OPTIONS FETCHMAIL_OPTS) 1.45 +$(configfile /etc/fetchmail.conf FETCHMAIL_CONF) 1.46 + <hbox> 1.47 + $(startstopdaemon fetchmail) 1.48 + </hbox> 1.49 + </frame> 1.50 +EOT 1.51 +} 1.52 + 1.53 +# 1.54 +# Postgrey 1.55 +# 1.56 +tab_postgrey() 1.57 +{ 1.58 +cat <<EOT 1.59 + <frame Postgrey (SMTP grey list)> 1.60 +$(helpdaemon postgrey 100x34 POSTGREY_OPTIONS POSTGREY_OPTS) 1.61 +$(webbutton postgrey) 1.62 + <hbox> 1.63 + $(startstopdaemon postgrey) 1.64 + </hbox> 1.65 + </frame> 1.66 +EOT 1.67 +} 1.68 + 1.69 +data_smtp() 1.70 +{ 1.71 +cat <<EOT 1.72 +postfix Postfix tab_postfix 1.73 +fetchmail Fetchmail tab_fetchmail 1.74 +postgrey Grey\ list tab_postgrey 1.75 +EOT 1.76 +} 1.77 + 1.78 +# 1.79 +# smtp tab 1.80 +# 1.81 +tab_smtp() 1.82 +{ 1.83 +use_tab data_smtp 1.84 +} 1.85 + 1.86 +# 1.87 +# Cyrus IMAP 1.88 +# 1.89 +tab_cyrus() 1.90 +{ 1.91 +cat <<EOT 1.92 + <frame Cyrus IMAP> 1.93 +$(webbutton cyrus-imapd) 1.94 +$(configfile /etc/imapd.conf IMAPD_CONF) 1.95 +$(configfile /etc/cyrus.conf CYRUS_CONF) 1.96 + <hbox> 1.97 + $(startstopdaemon cyrus-imapd) 1.98 + </hbox> 1.99 + </frame> 1.100 +EOT 1.101 +} 1.102 + 1.103 +# 1.104 +# Perdition IMAP/POP3 proxy 1.105 +# 1.106 +tab_perdition() 1.107 +{ 1.108 +cat <<EOT 1.109 + <frame Perdition proxy> 1.110 +$(webbutton perdition) 1.111 +$(helpdaemon perdition 100x34 PERDITION_OPTIONS PERDITION_OPTS) 1.112 +$(configfile /etc/perdition/perdition.imap4.conf PROXY_IMAP_CONF) 1.113 +$(configfile /etc/perdition/perdition.pop3.conf PROXY_POP3_CONF) 1.114 + <hbox> 1.115 + $(startstopdaemon perdition) 1.116 + </hbox> 1.117 + </frame> 1.118 +EOT 1.119 +} 1.120 + 1.121 +data_imap() 1.122 +{ 1.123 +cat <<EOT 1.124 +cyradm Cyrus tab_cyrus 1.125 +perdition Proxy tab_perdition 1.126 +EOT 1.127 +} 1.128 + 1.129 +# 1.130 +# imap tab 1.131 +# 1.132 +tab_imap() 1.133 +{ 1.134 +use_tab data_imap 1.135 +} 1.136 + 1.137 +# 1.138 +# Squid 1.139 +# 1.140 +tab_squid() 1.141 +{ 1.142 +cat <<EOT 1.143 + <frame Squid> 1.144 +$(helpdaemon squid 100x34 SQUID_OPTIONS SQUID_OPTS) 1.145 +$(webbutton squid) 1.146 +$(configfile /etc/squid.conf SQUID_CONF) 1.147 +$([ -s /etc/squidGuard/squidGuard.conf ] && configfile /etc/squidGuard/squidGuard.conf SQUIDGUARD_CONF) 1.148 + <hbox> 1.149 + $(startstopdaemon squid) 1.150 + </hbox> 1.151 + </frame> 1.152 +EOT 1.153 +} 1.154 + 1.155 +# 1.156 +# Asterisk 1.157 +# 1.158 +tab_asterisk() 1.159 +{ 1.160 +cat <<EOT 1.161 + <frame Asterisk telephony> 1.162 +$(webbutton asterisk) 1.163 +$(configfile /etc/asterisk/extensions.conf ASTERISK_CONF) 1.164 + <hbox> 1.165 + $(startstopdaemon asterisk) 1.166 + </hbox> 1.167 + </frame> 1.168 +EOT 1.169 +} 1.170 + 1.171 +# 1.172 +# OpenLDAP 1.173 +# 1.174 +tab_openldap() 1.175 +{ 1.176 +cat <<EOT 1.177 + <frame OpenLDAP> 1.178 +$(helpdaemon /usr/libexec/slapd 100x34 LDAP_OPTIONS LDAP_OPTS) 1.179 +$(webbutton openldap) 1.180 +$(configfile /etc/openldap/slapd.conf LDAP_CONF) 1.181 + <hbox> 1.182 + $(startstopdaemon openldap) 1.183 + </hbox> 1.184 + </frame> 1.185 +EOT 1.186 +} 1.187 + 1.188 +# 1.189 +# MySQL 1.190 +# 1.191 +tab_mysql() 1.192 +{ 1.193 +cat <<EOT 1.194 + <frame MySQL> 1.195 +$(helpdaemon mysqld_safe 100x34 MYSQL_OPTIONS MYSQL_OPTS) 1.196 +$(webbutton mysql) 1.197 +$(configfile /etc/my.conf MYSQL_CONF) 1.198 + <hbox> 1.199 + $(startstopdaemon mysql) 1.200 + </hbox> 1.201 + </frame> 1.202 +EOT 1.203 +} 1.204 + 1.205 +# 1.206 +# PostgreSQL 1.207 +# 1.208 +tab_postgresql() 1.209 +{ 1.210 +cat <<EOT 1.211 + <frame PostgreSQL> 1.212 +$(helpdaemon postgres 100x34 PGSQL_OPTIONS PGSQL_OPTS) 1.213 +$(webbutton postgresql) 1.214 +$(configfile /etc/postgresql.conf POSTGRESQL_CONF) 1.215 + <hbox> 1.216 + $(startstopdaemon postgresql) 1.217 + </hbox> 1.218 + </frame> 1.219 +EOT 1.220 +} 1.221 + 1.222 +data_sql() 1.223 +{ 1.224 +cat <<EOT 1.225 +mysqld_safe MySQL tab_mysql 1.226 +postgres PostgreSQL tab_postgresql 1.227 +EOT 1.228 +} 1.229 + 1.230 +# 1.231 +# sql tab 1.232 +# 1.233 +tab_sql() 1.234 +{ 1.235 +use_tab data_sql 1.236 +} 1.237 + 1.238 +# 1.239 # rsync server 1.240 # 1.241 tab_rsync() 1.242 @@ -572,7 +793,7 @@ 1.243 $([ -x /usr/sbin/lighttpd -o -x /usr/bin/httpd ] && echo "true" || 1.244 echo "#") HTTP tab_http 1.245 rsync Rsync tab_rsync 1.246 -smbd SAMBA tab_wins 1.247 +smbd SAMBA tab_wins 1.248 inetd Inetd tab_inetd 1.249 zcip ZeroConf tab_zcip 1.250 $([ -x /usr/sbin/udhcpd -o -x /usr/sbin/dhcpd -o -x /usr/sbin/dnsmasq ] && 1.251 @@ -585,9 +806,16 @@ 1.252 echo "#") DNS tab_dns 1.253 x11vnc VNC tab_vnc 1.254 knockd Knock tab_knockd 1.255 +$([ -x /usr/bin/mysqld_safe -o -x /usr/bin/postgres ] && 1.256 +echo "true" || 1.257 +echo "#") SQL tab_sql 1.258 +slapcat LDAP tab_openldap 1.259 +postfix SMTP tab_smtp 1.260 +cyradm IMAP/POP3 tab_imap 1.261 +squid Web\ cache tab_squid 1.262 +asterisk Telephony tab_asterisk 1.263 #TODO+callback pppd Pppd tab_pppd 1.264 #TODO pptpd PoPToP tab_poptop 1.265 -#TODO squid *sql openldap 1.266 EOT 1.267 } 1.268 1.269 @@ -661,6 +889,7 @@ 1.270 true Servers tab_servers 1.271 iptables Firewall tab_firewall 1.272 knock Knock tab_knock 1.273 +true Status tab_status 1.274 EOT 1.275 } 1.276