Changeset 344 for trunk/push-web
- Timestamp:
- Nov 1, 2017, 7:24:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/push-web
r343 r344 5 5 # 2011/03/30 gabriel - make it generic 6 6 7 export PATH=/bin:/sbin:/usr/bin:/usr/sbin 8 export LANG=C 9 7 10 SITE_NAME='' 8 11 REMOTE_SERVER=localhost … … 21 24 22 25 23 # local command24 MKDIR=/bin/mkdir25 DATE=/bin/date26 CAT=/bin/cat27 TAIL=/usr/bin/tail28 HEAD=/usr/bin/head29 SSH=/usr/bin/ssh30 SCP=/usr/bin/scp31 KLASK=/usr/sbin/klask32 RSYNC=/usr/bin/rsync33 34 26 # remote command 35 27 DOT=/usr/bin/dot 36 28 37 29 38 $MKDIR-p ${TMP}30 mkdir -p ${TMP} 39 31 if [ ! -d ${TMP} ] 40 32 then … … 45 37 46 38 47 LOCALTIME=$( $DATE"+%Y-%m-%d %H:%M")48 49 50 $KLASKexportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt51 52 53 $KLASKexportdb > ${TMP}/hostname-db.txt54 $KLASKexportsw > ${TMP}/switch-db.txt55 $KLASKip-free > ${TMP}/ipfree-db.txt56 $KLASKbad-vlan-id > ${TMP}/badvlan-db.txt57 58 59 $CAT<<END > ${TMP}/index.html39 LOCALTIME=$(date "+%Y-%m-%d %H:%M") 40 41 42 klask exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt 43 44 45 klask exportdb > ${TMP}/hostname-db.txt 46 klask exportsw > ${TMP}/switch-db.txt 47 klask ip-free > ${TMP}/ipfree-db.txt 48 klask bad-vlan-id > ${TMP}/badvlan-db.txt 49 50 51 cat <<END > ${TMP}/index.html 60 52 <html> 61 53 <head> … … 86 78 <li id="selected"><a href="index.html">IP detected</a></li> 87 79 <li><a href="ip-free.html">IP available</a></li> 88 <li><a href="bad-vlan-id.html"> Bad VLAN ID</a></li>80 <li><a href="bad-vlan-id.html">VLAN mismatch</a></li> 89 81 </ul> 90 82 </div> … … 93 85 <p> 94 86 The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment: 95 <a href="hostname-db.txt">Computers </a>,96 <a href="switch-db.txt">Switches </a>,87 <a href="hostname-db.txt">Computers DB</a>, 88 <a href="switch-db.txt">Switches DB</a>, 97 89 <a href="ipfree-db.txt">IP available</a>, 98 <a href="badvlan-db.txt"> Bad VLAN ID</a>,99 <a href="switch-map.txt">Map </a>.100 </p> 101 END 102 103 $KLASKexportdb --format html >> ${TMP}/index.html104 105 $CAT<<END >> ${TMP}/index.html90 <a href="badvlan-db.txt">VLAN mismatch</a>, 91 <a href="switch-map.txt">Map dot source</a>. 92 </p> 93 END 94 95 klask exportdb --format html >> ${TMP}/index.html 96 97 cat <<END >> ${TMP}/index.html 106 98 </div> 107 99 <p class="copyright"> … … 113 105 114 106 115 $CAT<<END > ${TMP}/ip-free.html107 cat <<END > ${TMP}/ip-free.html 116 108 <html> 117 109 <head> … … 131 123 <li><a href="index.html">IP detected</a></li> 132 124 <li id="selected"><a href="ip-free.html">IP available</a></li> 133 <li><a href="bad-vlan-id.html"> Bad VLAN ID</a></li>125 <li><a href="bad-vlan-id.html">VLAN mismatch</a></li> 134 126 </ul> 135 127 </div> … … 138 130 <p> 139 131 The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment: 140 <a href="hostname-db.txt">Computers </a>,141 <a href="switch-db.txt">Switches </a>,132 <a href="hostname-db.txt">Computers DB</a>, 133 <a href="switch-db.txt">Switches DB</a>, 142 134 <a href="ipfree-db.txt">IP available</a>, 143 <a href="bad-vlan-id-db.txt"> Bad VLAN ID</a>,144 <a href="switch-map.txt">Map </a>.145 </p> 146 END 147 148 $KLASKip-free --format html >> ${TMP}/ip-free.html149 150 $CAT<<END >> ${TMP}/ip-free.html135 <a href="bad-vlan-id-db.txt">VLAN mismatch</a>, 136 <a href="switch-map.txt">Map dot source</a>. 137 </p> 138 END 139 140 klask ip-free --format html >> ${TMP}/ip-free.html 141 142 cat <<END >> ${TMP}/ip-free.html 151 143 </div> 152 144 <p class="copyright"> … … 158 150 159 151 160 $CAT<<END > ${TMP}/bad-vlan-id.html152 cat <<END > ${TMP}/bad-vlan-id.html 161 153 <html> 162 154 <head> … … 176 168 <li><a href="index.html">IP detected</a></li> 177 169 <li><a href="ip-free.html">IP available</a></li> 178 <li id="selected"><a href="bad-vlan-id.html"> Bad VLAN ID</a></li>170 <li id="selected"><a href="bad-vlan-id.html">VLAN mismatch</a></li> 179 171 </ul> 180 172 </div> … … 183 175 <p> 184 176 The main raw results of Klask are accessible directly, via wget or curl for example, for a specific treatment: 185 <a href="hostname-db.txt">Computers </a>,186 <a href="switch-db.txt">Switches </a>,177 <a href="hostname-db.txt">Computers DB</a>, 178 <a href="switch-db.txt">Switches DB</a>, 187 179 <a href="ipfree-db.txt">IP available</a>, 188 <a href="bad-vlan-id-db.txt"> Bad VLAN ID</a>,189 <a href="switch-map.txt">Map </a>.190 </p> 191 END 192 193 $KLASKbad-vlan-id --format html >> ${TMP}/bad-vlan-id.html194 195 $CAT<<END >> ${TMP}/bad-vlan-id.html180 <a href="bad-vlan-id-db.txt">VLAN mismatch</a>, 181 <a href="switch-map.txt">Map dot source</a>. 182 </p> 183 END 184 185 klask bad-vlan-id --format html >> ${TMP}/bad-vlan-id.html 186 187 cat <<END >> ${TMP}/bad-vlan-id.html 196 188 </div> 197 189 <p class="copyright"> … … 205 197 if [ "${REMOTE_SERVER}" = "localhost" ] 206 198 then 207 $RSYNC\199 rsync \ 208 200 /usr/share/klask/sorttable-klask.js \ 209 201 /usr/share/klask/style-klask.css \ … … 218 210 219 211 else 220 $RSYNC\212 rsync \ 221 213 /usr/share/klask/sorttable-klask.js \ 222 214 /usr/share/klask/style-klask.css \ … … 229 221 230 222 231 $SSH${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)"223 ssh ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)" 232 224 fi
Note: See TracChangeset
for help on using the changeset viewer.