uninstall.sh 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. #!/bin/bash
  2. # Author: yeho <lj2007331 AT gmail.com>
  3. # BLOG: https://blog.linuxeye.cn
  4. #
  5. # Notes: OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+
  6. #
  7. # Project home page:
  8. # https://oneinstack.com
  9. # https://github.com/oneinstack/oneinstack
  10. export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
  11. clear
  12. printf "
  13. #######################################################################
  14. # OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+ #
  15. # Uninstall OneinStack #
  16. # For more information please visit https://oneinstack.com #
  17. #######################################################################
  18. "
  19. # Check if user is root
  20. [ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }
  21. oneinstack_dir=$(dirname "`readlink -f $0`")
  22. pushd ${oneinstack_dir} > /dev/null
  23. . ./options.conf
  24. . ./include/color.sh
  25. . ./include/get_char.sh
  26. . ./include/check_dir.sh
  27. Usage(){
  28. printf "
  29. Usage: $0 [ ${CMSG}all${CEND} | ${CMSG}web${CEND} | ${CMSG}mysql${CEND} | ${CMSG}postgresql${CEND} | ${CMSG}mongodb${CEND} | ${CMSG}php${CEND} | ${CMSG}hhvm${CEND} | ${CMSG}pureftpd${CEND} | ${CMSG}redis${CEND} | ${CMSG}memcached${CEND} ]
  30. ${CMSG}all${CEND} --->Uninstall All
  31. ${CMSG}web${CEND} --->Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
  32. ${CMSG}mysql${CEND} --->Uninstall MySQL/MariaDB/Percona/AliSQL
  33. ${CMSG}postgresql${CEND} --->Uninstall PostgreSQL
  34. ${CMSG}mongodb${CEND} --->Uninstall MongoDB
  35. ${CMSG}php${CEND} --->Uninstall PHP
  36. ${CMSG}hhvm${CEND} --->Uninstall HHVM
  37. ${CMSG}pureftpd${CEND} --->Uninstall PureFtpd
  38. ${CMSG}redis${CEND} --->Uninstall Redis
  39. ${CMSG}memcached${CEND} --->Uninstall Memcached
  40. "
  41. }
  42. Uninstall_status() {
  43. while :; do echo
  44. read -e -p "Do you want to uninstall? [y/n]: " uninstall_yn
  45. echo
  46. if [[ ! ${uninstall_yn} =~ ^[y,n]$ ]]; then
  47. echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
  48. else
  49. break
  50. fi
  51. done
  52. }
  53. Print_Warn() {
  54. echo
  55. echo "${CWARNING}You will uninstall OneinStack, Please backup your configure files and DB data! ${CEND}"
  56. }
  57. Print_web() {
  58. [ -d "${nginx_install_dir}" ] && echo "${nginx_install_dir}"
  59. [ -d "${tengine_install_dir}" ] && echo "${tengine_install_dir}"
  60. [ -d "${openresty_install_dir}" ] && echo "${openresty_install_dir}"
  61. [ -e "/etc/init.d/nginx" ] && echo '/etc/init.d/nginx'
  62. [ -e "/lib/systemd/system/nginx.service" ] && echo '/lib/systemd/system/nginx.service'
  63. [ -e "/etc/logrotate.d/nginx" ] && echo '/etc/logrotate.d/nginx'
  64. [ -d "${apache_install_dir}" ] && echo "${apache_install_dir}"
  65. [ -e "/lib/systemd/system/httpd.service" ] && echo '/lib/systemd/system/httpd.service'
  66. [ -e "/etc/init.d/httpd" ] && echo "/etc/init.d/httpd"
  67. [ -e "/etc/logrotate.d/apache" ] && echo "/etc/logrotate.d/apache"
  68. [ -d "${tomcat_install_dir}" ] && echo "${tomcat_install_dir}"
  69. [ -e "/etc/init.d/tomcat" ] && echo "/etc/init.d/tomcat"
  70. [ -e "/etc/logrotate.d/tomcat" ] && echo "/etc/logrotate.d/tomcat"
  71. [ -d "/usr/java" ] && echo '/usr/java'
  72. [ -d "/usr/local/apr" ] && echo '/usr/local/apr'
  73. }
  74. Uninstall_Web() {
  75. [ -d "${nginx_install_dir}" ] && { killall nginx > /dev/null 2>&1; rm -rf ${nginx_install_dir} /etc/init.d/nginx /etc/logrotate.d/nginx; sed -i "s@${nginx_install_dir}/sbin:@@" /etc/profile; echo "${CMSG}Nginx uninstall completed! ${CEND}"; }
  76. [ -d "${tengine_install_dir}" ] && { killall nginx > /dev/null 2>&1; rm -rf ${tengine_install_dir} /etc/init.d/nginx /etc/logrotate.d/nginx; sed -i "s@${tengine_install_dir}/sbin:@@" /etc/profile; echo "${CMSG}Tengine uninstall completed! ${CEND}"; }
  77. [ -d "${openresty_install_dir}" ] && { killall nginx > /dev/null 2>&1; rm -rf ${openresty_install_dir} /etc/init.d/nginx /etc/logrotate.d/nginx; sed -i "s@${openresty_install_dir}/nginx/sbin:@@" /etc/profile; echo "${CMSG}OpenResty uninstall completed! ${CEND}"; }
  78. [ -e "/lib/systemd/system/nginx.service" ] && { systemctl disable nginx > /dev/null 2>&1; rm -f /lib/systemd/system/nginx.service; }
  79. [ -d "${apache_install_dir}" ] && { service httpd stop > /dev/null 2>&1; rm -rf ${apache_install_dir} /etc/init.d/httpd /etc/logrotate.d/apache; sed -i "s@${apache_install_dir}/bin:@@" /etc/profile; echo "${CMSG}Apache uninstall completed! ${CEND}"; }
  80. [ -e "/lib/systemd/system/httpd.service" ] && { systemctl disable httpd > /dev/null 2>&1; rm -f /lib/systemd/system/httpd.service; }
  81. [ -d "${tomcat_install_dir}" ] && { killall java > /dev/null 2>&1; chmod +x /etc/logrotate.d/tomcat; rm -rf ${tomcat_install_dir} /etc/init.d/tomcat /etc/logrotate.d/tomcat /usr/local/apr; echo "${CMSG}Tomcat uninstall completed! ${CEND}"; }
  82. [ -d "/usr/java" ] && { rm -rf /usr/java; sed -i '/export JAVA_HOME=/d' /etc/profile; sed -i '/export CLASSPATH=/d' /etc/profile; sed -i 's@\$JAVA_HOME/bin:@@' /etc/profile; }
  83. [ -e "${wwwroot_dir}" ] && /bin/mv ${wwwroot_dir}{,$(date +%Y%m%d%H)}
  84. sed -i 's@^website_name=.*@website_name=@' ./options.conf
  85. sed -i 's@^local_bankup_yn=.*@local_bankup_yn=y@' ./options.conf
  86. sed -i 's@^remote_bankup_yn=.*@remote_bankup_yn=n@' ./options.conf
  87. }
  88. Print_MySQL() {
  89. [ -e "${db_install_dir}" ] && echo "${db_install_dir}"
  90. [ -e "/etc/init.d/mysqld" ] && echo "/etc/init.d/mysqld"
  91. [ -e "/etc/my.cnf" ] && echo "/etc/my.cnf"
  92. }
  93. Print_PostgreSQL() {
  94. [ -e "${pgsql_install_dir}" ] && echo "${pgsql_install_dir}"
  95. [ -e "/etc/init.d/postgresql" ] && echo "/etc/init.d/postgresql"
  96. [ -e "/lib/systemd/system/postgresql.service" ] && echo "/lib/systemd/system/postgresql.service"
  97. }
  98. Print_MongoDB() {
  99. [ -e "${mongo_install_dir}" ] && echo "${mongo_install_dir}"
  100. [ -e "/etc/init.d/mongod" ] && echo "/etc/init.d/mongod"
  101. [ -e "/lib/systemd/system/mongod.service" ] && echo "/lib/systemd/system/mongod.service"
  102. [ -e "/etc/mongod.conf" ] && echo "/etc/mongod.conf"
  103. }
  104. Uninstall_MySQL() {
  105. # uninstall mysql,mariadb,percona,alisql
  106. if [ -d "${db_install_dir}/support-files" ]; then
  107. service mysqld stop > /dev/null 2>&1
  108. rm -rf ${db_install_dir} /etc/init.d/mysqld /etc/my.cnf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
  109. id -u mysql >/dev/null 2>&1 ; [ $? -eq 0 ] && userdel mysql
  110. [ -e "${db_data_dir}" ] && /bin/mv ${db_data_dir}{,$(date +%Y%m%d%H)}
  111. sed -i 's@^dbrootpwd=.*@dbrootpwd=@' ./options.conf
  112. sed -i "s@${db_install_dir}/bin:@@" /etc/profile
  113. echo "${CMSG}MySQL uninstall completed! ${CEND}"
  114. fi
  115. }
  116. Uninstall_PostgreSQL() {
  117. # uninstall postgresql
  118. if [ -e "${pgsql_install_dir}/bin/psql" ]; then
  119. service postgresql stop > /dev/null 2>&1
  120. rm -rf ${pgsql_install_dir} /etc/init.d/postgresql
  121. [ -e "/lib/systemd/system/postgresql.service" ] && { systemctl disable postgresql > /dev/null 2>&1; rm -f /lib/systemd/system/postgresql.service; }
  122. [ -e "${php_install_dir}/etc/php.d/07-pgsql.ini" ] && rm -f ${php_install_dir}/etc/php.d/07-pgsql.ini
  123. id -u postgres >/dev/null 2>&1 ; [ $? -eq 0 ] && userdel postgres
  124. [ -e "${pgsql_data_dir}" ] && /bin/mv ${pgsql_data_dir}{,$(date +%Y%m%d%H)}
  125. sed -i 's@^dbpostgrespwd=.*@dbpostgrespwd=@' ./options.conf
  126. sed -i "s@${pgsql_install_dir}/bin:@@" /etc/profile
  127. echo "${CMSG}PostgreSQL uninstall completed! ${CEND}"
  128. fi
  129. }
  130. Uninstall_MongoDB() {
  131. # uninstall mongodb
  132. if [ -e "${mongo_install_dir}/bin/mongo" ]; then
  133. service mongod stop > /dev/null 2>&1
  134. rm -rf ${mongo_install_dir} /etc/mongod.conf /etc/init.d/mongod /tmp/mongo*.sock
  135. [ -e "/lib/systemd/system/mongod.service" ] && { systemctl disable mongod > /dev/null 2>&1; rm -f /lib/systemd/system/mongod.service; }
  136. [ -e "${php_install_dir}/etc/php.d/07-mongo.ini" ] && rm -f ${php_install_dir}/etc/php.d/07-mongo.ini
  137. [ -e "${php_install_dir}/etc/php.d/07-mongodb.ini" ] && rm -f ${php_install_dir}/etc/php.d/07-mongodb.ini
  138. id -u mongod > /dev/null 2>&1 ; [ $? -eq 0 ] && userdel mongod
  139. [ -e "${mongo_data_dir}" ] && /bin/mv ${mongo_data_dir}{,$(date +%Y%m%d%H)}
  140. sed -i 's@^dbmongopwd=.*@dbmongopwd=@' ./options.conf
  141. sed -i "s@${mongo_install_dir}/bin:@@" /etc/profile
  142. echo "${CMSG}MongoDB uninstall completed! ${CEND}"
  143. fi
  144. }
  145. Print_PHP() {
  146. [ -e "${php_install_dir}" ] && echo "${php_install_dir}"
  147. [ -e "/etc/init.d/php-fpm" ] && echo "/etc/init.d/php-fpm"
  148. [ -e "/lib/systemd/system/php-fpm.service" ] && echo '/lib/systemd/system/php-fpm.service'
  149. [ -e "${imagick_install_dir}" ] && echo "${imagick_install_dir}"
  150. [ -e "${gmagick_install_dir}" ] && echo "${gmagick_install_dir}"
  151. [ -e "${curl_install_dir}" ] && echo "${curl_install_dir}"
  152. }
  153. Uninstall_PHP() {
  154. [ -e "/etc/init.d/php-fpm" ] && { service php-fpm stop > /dev/null 2>&1; rm -f /etc/init.d/php-fpm; }
  155. [ -e "/lib/systemd/system/php-fpm.service" ] && { systemctl stop php-fpm > /dev/null 2>&1; systemctl disable php-fpm > /dev/null 2>&1; rm -f /lib/systemd/system/php-fpm.service; }
  156. [ -e "${php_install_dir}" ] && { rm -rf ${php_install_dir}; echo "${CMSG}PHP uninstall completed! ${CEND}"; }
  157. [ -e "${imagick_install_dir}" ] && rm -rf ${imagick_install_dir}
  158. [ -e "${gmagick_install_dir}" ] && rm -rf ${gmagick_install_dir}
  159. [ -e "${curl_install_dir}" ] && rm -rf "${curl_install_dir}"
  160. sed -i "s@${php_install_dir}/bin:@@" /etc/profile
  161. }
  162. Print_HHVM() {
  163. [ -e "/usr/bin/hhvm" ] && echo "/usr/bin/hhvm"
  164. [ -e "/etc/hhvm" ] && echo "/etc/hhvm"
  165. [ -e "/var/log/hhvm" ] && echo "/var/log/hhvm"
  166. [ -e "/lib/systemd/system/hhvm.service" ] && echo "/lib/systemd/system/hhvm.service"
  167. [ -e "/etc/supervisord.conf" ] && echo "/etc/supervisord.conf"
  168. [ -e "/etc/init.d/supervisord" ] && echo "/etc/init.d/supervisord"
  169. }
  170. Uninstall_HHVM() {
  171. [ -e "/lib/systemd/system/hhvm.service" ] && { systemctl disable hhvm > /dev/null 2>&1; rm -f /lib/systemd/system/hhvm.service; }
  172. [ -e "/etc/init.d/supervisord" ] && { service supervisord stop > /dev/null 2>&1; rm -f /etc/supervisord.conf /etc/init.d/supervisord; }
  173. [ -e "/usr/bin/hhvm" ] && { rpm -e hhvm; rm -rf /etc/hhvm /var/log/hhvm /usr/bin/hhvm; echo "${CMSG}HHVM uninstall completed! ${CEND}"; }
  174. }
  175. Print_PureFtpd() {
  176. [ -e "${pureftpd_install_dir}" ] && echo "${pureftpd_install_dir}"
  177. [ -e "/etc/init.d/pureftpd" ] && echo "/etc/init.d/pureftpd"
  178. [ -e "/lib/systemd/system/pureftpd.service" ] && echo "/lib/systemd/system/pureftpd.service"
  179. }
  180. Uninstall_PureFtpd() {
  181. [ -e "${pureftpd_install_dir}" ] && { service pureftpd stop > /dev/null 2>&1; rm -rf ${pureftpd_install_dir} /etc/init.d/pureftpd; echo "${CMSG}Pureftpd uninstall completed! ${CEND}"; }
  182. [ -e "/lib/systemd/system/pureftpd.service" ] && { systemctl disable pureftpd > /dev/null 2>&1; rm -f /lib/systemd/system/pureftpd.service; }
  183. }
  184. Print_Redis() {
  185. [ -e "${redis_install_dir}" ] && echo "${redis_install_dir}"
  186. [ -e "/etc/init.d/redis-server" ] && echo "/etc/init.d/redis-server"
  187. [ -e "/lib/systemd/system/redis-server.service" ] && echo '/lib/systemd/system/redis-server.service'
  188. }
  189. Uninstall_Redis() {
  190. [ -e "${redis_install_dir}" ] && { service redis-server stop > /dev/null 2>&1; rm -rf ${redis_install_dir} /etc/init.d/redis-server /usr/local/bin/redis-*; echo "${CMSG}Redis uninstall completed! ${CEND}"; }
  191. [ -e "/lib/systemd/system/redis-server.service" ] && { systemctl disable redis-server > /dev/null 2>&1; rm -f /lib/systemd/system/redis-server.service; }
  192. }
  193. Print_Memcached() {
  194. [ -e "${memcached_install_dir}" ] && echo "${memcached_install_dir}"
  195. [ -e "/etc/init.d/memcached" ] && echo "/etc/init.d/memcached"
  196. [ -e "/usr/bin/memcached" ] && echo "/usr/bin/memcached"
  197. }
  198. Uninstall_Memcached() {
  199. [ -e "${memcached_install_dir}" ] && { service memcached stop > /dev/null 2>&1; rm -rf ${memcached_install_dir} /etc/init.d/memcached /usr/bin/memcached; echo "${CMSG}Memcached uninstall completed! ${CEND}"; }
  200. }
  201. Print_openssl() {
  202. [ -d "${openssl_install_dir}" ] && echo "${openssl_install_dir}"
  203. }
  204. Uninstall_openssl() {
  205. [ -d "${openssl_install_dir}" ] && rm -rf ${openssl_install_dir}
  206. }
  207. Menu(){
  208. while :; do
  209. printf "
  210. What Are You Doing?
  211. \t${CMSG}0${CEND}. Uninstall All
  212. \t${CMSG}1${CEND}. Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
  213. \t${CMSG}2${CEND}. Uninstall MySQL/MariaDB/Percona/AliSQL
  214. \t${CMSG}3${CEND}. Uninstall PostgreSQL
  215. \t${CMSG}4${CEND}. Uninstall MongoDB
  216. \t${CMSG}5${CEND}. Uninstall PHP
  217. \t${CMSG}6${CEND}. Uninstall HHVM
  218. \t${CMSG}7${CEND}. Uninstall PureFtpd
  219. \t${CMSG}8${CEND}. Uninstall Redis
  220. \t${CMSG}9${CEND}. Uninstall Memcached
  221. \t${CMSG}q${CEND}. Exit
  222. "
  223. echo
  224. read -e -p "Please input the correct option: " Number
  225. if [[ ! $Number =~ ^[0-9,q]$ ]]; then
  226. echo "${CWARNING}input error! Please only input 0~9 and q${CEND}"
  227. else
  228. case "$Number" in
  229. 0)
  230. Print_Warn
  231. Print_web
  232. Print_MySQL
  233. Print_PostgreSQL
  234. Print_MongoDB
  235. Print_PHP
  236. Print_HHVM
  237. Print_PureFtpd
  238. Print_Redis
  239. Print_Memcached
  240. Print_openssl
  241. Uninstall_status
  242. if [ "${uninstall_yn}" == 'y' ]; then
  243. Uninstall_Web
  244. Uninstall_MySQL
  245. Uninstall_PostgreSQL
  246. Uninstall_MongoDB
  247. Uninstall_PHP
  248. Uninstall_HHVM
  249. Uninstall_PureFtpd
  250. Uninstall_Redis
  251. Uninstall_Memcached
  252. Uninstall_openssl
  253. else
  254. exit
  255. fi
  256. ;;
  257. 1)
  258. Print_Warn
  259. Print_web
  260. Uninstall_status
  261. [ "${uninstall_yn}" == 'y' ] && Uninstall_Web || exit
  262. ;;
  263. 2)
  264. Print_Warn
  265. Print_MySQL
  266. Uninstall_status
  267. [ "${uninstall_yn}" == 'y' ] && Uninstall_MySQL || exit
  268. ;;
  269. 3)
  270. Print_Warn
  271. Print_PostgreSQL
  272. Uninstall_status
  273. [ "${uninstall_yn}" == 'y' ] && Uninstall_PostgreSQL || exit
  274. ;;
  275. 4)
  276. Print_Warn
  277. Print_MongoDB
  278. Uninstall_status
  279. [ "${uninstall_yn}" == 'y' ] && Uninstall_MongoDB || exit
  280. ;;
  281. 5)
  282. Print_PHP
  283. Uninstall_status
  284. [ "${uninstall_yn}" == 'y' ] && Uninstall_PHP || exit
  285. ;;
  286. 6)
  287. Print_HHVM
  288. Uninstall_status
  289. [ "${uninstall_yn}" == 'y' ] && Uninstall_HHVM || exit
  290. ;;
  291. 7)
  292. Print_PureFtpd
  293. Uninstall_status
  294. [ "${uninstall_yn}" == 'y' ] && Uninstall_PureFtpd || exit
  295. ;;
  296. 8)
  297. Print_Redis
  298. Uninstall_status
  299. [ "${uninstall_yn}" == 'y' ] && Uninstall_Redis || exit
  300. ;;
  301. 9)
  302. Print_Memcached
  303. Uninstall_status
  304. [ "${uninstall_yn}" == 'y' ] && Uninstall_Memcached || exit
  305. ;;
  306. q)
  307. exit
  308. ;;
  309. esac
  310. fi
  311. done
  312. }
  313. if [ $# == 0 ]; then
  314. Menu
  315. elif [ $# == 1 ]; then
  316. case $1 in
  317. all)
  318. Print_Warn
  319. Print_web
  320. Print_MySQL
  321. Print_PostgreSQL
  322. Print_MongoDB
  323. Print_PHP
  324. Print_HHVM
  325. Print_PureFtpd
  326. Print_Redis
  327. Print_Memcached
  328. Print_openssl
  329. Uninstall_status
  330. if [ "${uninstall_yn}" == 'y' ]; then
  331. Uninstall_Web
  332. Uninstall_MySQL
  333. Uninstall_PHP
  334. Uninstall_HHVM
  335. Uninstall_PureFtpd
  336. Uninstall_Redis
  337. Uninstall_Memcached
  338. Uninstall_openssl
  339. else
  340. exit
  341. fi
  342. ;;
  343. web)
  344. Print_Warn
  345. Print_web
  346. Uninstall_status
  347. [ "${uninstall_yn}" == 'y' ] && Uninstall_Web || exit
  348. ;;
  349. mysql)
  350. Print_Warn
  351. Print_MySQL
  352. Uninstall_status
  353. [ "${uninstall_yn}" == 'y' ] && Uninstall_MySQL || exit
  354. ;;
  355. postgresql)
  356. Print_Warn
  357. Print_PostgreSQL
  358. Uninstall_status
  359. [ "${uninstall_yn}" == 'y' ] && Uninstall_PostgreSQL || exit
  360. ;;
  361. mongodb)
  362. Print_Warn
  363. Print_MongoDB
  364. Uninstall_status
  365. [ "${uninstall_yn}" == 'y' ] && Uninstall_MongoDB || exit
  366. ;;
  367. php)
  368. Print_PHP
  369. Uninstall_status
  370. [ "${uninstall_yn}" == 'y' ] && Uninstall_PHP || exit
  371. ;;
  372. hhvm)
  373. Print_HHVM
  374. Uninstall_status
  375. [ "${uninstall_yn}" == 'y' ] && Uninstall_HHVM || exit
  376. ;;
  377. pureftpd)
  378. Print_PureFtpd
  379. Uninstall_status
  380. [ "${uninstall_yn}" == 'y' ] && Uninstall_PureFtpd || exit
  381. ;;
  382. redis)
  383. Print_Redis
  384. Uninstall_status
  385. [ "${uninstall_yn}" == 'y' ] && Uninstall_Redis || exit
  386. ;;
  387. memcached)
  388. Print_Memcached
  389. Uninstall_status
  390. [ "${uninstall_yn}" == 'y' ] && Uninstall_Memcached || exit
  391. ;;
  392. *)
  393. Usage
  394. ;;
  395. esac
  396. else
  397. Usage
  398. fi