⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.sh

📁 mod_astrocam允许通过网络来控制网络摄像机、视频摄像机或是其它类似使用步进马达的设备。它作为一个Apache模块运行。
💻 SH
字号:
#!/bin/ksh# astrocam install script, written by Steffen Wendzel# (c) 2001,2002,2003 by Steffen Wendzel <astrocam@gmx.net># install script for astrocam v. 2.3.2VER="2.3.2"PROMPT="your answer > \c"CHNUM="please restart and choose one of the listed numbers !"ID=`id|awk '{print $1}'|sed s/uid\=//|sed s/\(/:/|awk -F: '{print $1}'`cleanup(){   if [ -f astrocam ]; then      make clean   fi}beenden(){   echo $CHNUM   cleanup   exit}if [ "$ID" != "0" ]; then   echo "need root access to install astrocam!"   exitficlearecho " === AstroCam Installation Programm ==="echoecho "(please read the docs !)"echoecho "answer the following questions with '1' or '0', then hit return."echoecho "1) edit astrocam.h to use your own hex-parallelport adress"echo "return) use the default value [0x378]"echoecho $PROMPTread RETURNif [ $RETURN = "1" ]; then   vi astrocam.hficleanupmakeif [ $? != 0 ]; then   echo "Make does not run, fix the problem and try again."   exitficlearecho "please choose the install path of astrocam"echoecho "1) /usr/sbin/"echo "2) /usr/local/sbin/"echo "3) /sbin"echo $PROMPTread ACPcase "$ACP" in   1)     SBINP="/usr/sbin/"     ;;   2)     SBINP="/usr/local/sbin/"     ;;   3)     SBINP="/sbin/"     ;;   *)     beenden     ;;esac	echo "installing astrocam binary"cp astrocam $SBINPecho "creating /etc/astrocam"if [ -e /etc/astrocam ]; then   echo "/etc/astrocam allready exists. "\        "remove and reinstall directory?"   echo   echo "1) yes"   echo "2) no"   echo $PROMPT   read ANSW   case "$ANSW" in      1)         rm -r /etc/astrocam	 mkdir /etc/astrocam	 chmod 777 /etc/astrocam	 ;;      2)         echo "Note: This can bring you some"\	      " problems for the new version!"	 ;;      *)         beenden         ;;   esacfiecho "creating files..."echo "/etc/astrocam/posfile"echo "/etc/astrocam/mindreh"echo "/etc/astrocam/maxdreh"echo "/etc/acam"echo "180">/etc/astrocam/maxdrehif [ $? != 0 ]; then # then all other files does not can created too!	echo "Cant write files to /etc/astrocam."	if [ ! -d /etc/astrocam ]; then		echo "/etc/astrocam is not a directory"	fi	exitfiecho "-180">/etc/astrocam/mindrehecho "0">/etc/astrocam/posfileecho "0">/etc/acamchmod 666 /etc/astrocam/maxdrehchmod 666 /etc/astrocam/mindrehchmod 666 /etc/astrocam/posfilechmod 666 /etc/acamechoecho "fine. now just enter your htdocs and cgi-bin directory"echoecho "1) /var/www/htdocs/ and /var/www/cgi-bin"echo "2) /usr/local/apache/htdocs/ and /usr/local/apache/cgi-bin"echo "3) /usr/local/httpd/htdocs/ and /usr/local/httpd/cgi-bin"echo "4) enter other strings"echo $PROMPTread DIRScase "$DIRS" in   1)      HTDOCS=/var/www/htdocs/      CGIBIN=/var/www/cgi-bin/      ;;   2)      HTDOCS=/usr/local/apache/htdocs/      CGIBIN=/usr/local/apache/cgi-bin/      ;;   3)      HTDOCS=/usr/local/httpd/htdocs/      CGIBIN=/usr/local/httpd/cgi-bin/      ;;   4)      echo "enter htdocs directory"      read HTDOCS      echo "enter cgi-bin directory"      read CGIBIN      ;;   *)         beenden      ;;esacechoecho "installing webfiles in your htdocs/cgi-bin directorys and removing binarys..."cp astrocam.cgi $CGIBIN; chmod 733 $CGIBIN/astrocam.cgicp design.css $HTDOCS; chmod 444 $HTDOCS/design.csscp pic.html $HTDOCS; chmod 444 $HTDOCS/pic.htmlcp webcam.jpg $HTDOCS/webcam.jpg; chmod 444 $HTDOCS/webcam.jpgcp acam_h.gif $HTDOCS/acam_h.gif; chmod 444 $HTDOCS/acam_h.gif# new since v. 2.3.1 - the auto make cleancleanupechoecho "AstroCam $VER is now installed on your system."echo "Now go on like the documentation of astrocam it describes"echoecho "                                   Thanks for installing astrocam !"echo "                                Steffen Wendzel, Astrocam Developer"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -