YUKI Hiroshi
null+****@clear*****
Thu Sep 25 16:42:28 JST 2014
YUKI Hiroshi 2014-09-25 16:42:28 +0900 (Thu, 25 Sep 2014) New Revision: 63490182d72b8991ab10489b9a1f864dd9861bc9 https://github.com/droonga/droonga-http-server/commit/63490182d72b8991ab10489b9a1f864dd9861bc9 Message: Separate codes to install service scripts Modified files: install.sh Modified: install.sh (+5 -9) =================================================================== --- install.sh 2014-09-25 16:39:39 +0900 (53901a6) +++ install.sh 2014-09-25 16:42:28 +0900 (d6ba1a3) @@ -233,13 +233,6 @@ install_master() { mv package.json.bak package.json } -install_service_script() { - INSTALL_LOCATION=$1 - DOWNLOAD_URL=$SCRIPT_URL/$PLATFORM/$NAME - curl -o $INSTALL_LOCATION $DOWNLOAD_URL - chmod +x $INSTALL_LOCATION -} - # ====================== for Debian/Ubuntu ========================== @@ -259,7 +252,8 @@ register_service_in_debian() { mkdir -p $pid_dir chown -R $USER:$GROUP $pid_dir - install_service_script /etc/init.d/$NAME debian + curl -o /etc/init.d/$NAME $SCRIPT_URL/debian/$NAME + chmod +x /etc/init.d/$NAME update-rc.d $NAME defaults } @@ -294,7 +288,9 @@ register_service_in_centos() { mkdir -p $pid_dir chown -R $USER:$GROUP $pid_dir - install_service_script /etc/rc.d/init.d/$NAME centos + #TODO: we should migrate to systemd in near future... + curl -o /rc.d/init.d/$NAME $SCRIPT_URL/centos/$NAME + chmod +x /rc.d/init.d/$NAME /sbin/chkconfig --add $NAME } -------------- next part -------------- HTML����������������������������...Download