commit ce7593f58075210c25b7951b987123a6f8b9d8c4 from: ollytom date: Fri Oct 26 20:39:40 2018 UTC initial commit commit - ae9074d6ee9d84e244345162bce255a1d579c4b8 commit + ce7593f58075210c25b7951b987123a6f8b9d8c4 blob - /dev/null blob + f6071231fef5592d929cc766ff554d60cc1369d3 (mode 755) --- /dev/null +++ mkbeatinstaller @@ -0,0 +1,27 @@ +#!/bin/sh + +usage="mkbeatinstaller beat ..." + +if test $# -lt 1 +then + echo $usage + exit 255 +fi + +version="6.4.2" +for b in $* +do + case "$b" + in + filebeat) + ;; + winlogbeat) + ;; + *) + echo "unsupported beat $b"; continue;; + esac + + test -f $b-$version-windows-x86_64.zip || curl -sO https://artifacts.elastic.co/downloads/beats/$b/$b-$version-windows-x86_64.zip + unzip -o $b-$version-windows-x86_64.zip >/dev/null + (cd $b-$version-windows-x86_64; mk${b}installer) +done blob - /dev/null blob + d92669dc4a17fd2284a027268472047fb530074d (mode 644) --- /dev/null +++ mkbeatinstaller.1 @@ -0,0 +1,54 @@ +.TH MKBEATINSTALLER 8 +.SH NAME +mkbeatinstaller, mkfilebeatinstaller, +mkwinlogbeatinstaller \- make elastic beat Windows installers +.SH SYNOPSIS +.B mkbeatinstaller +.I beat +\&... +.br +.B mkfilebeatinstaller +.br +.B mkwinlogbeatinstaller +.SH DESCRIPTION +.I mkfilebeatinstaller +and +.I mkwinlogbeat installer +are two NSIS scripts which create executable installers for the +elastic beat programs +.filebeat +and +.I winlogbeat +in the familiar Windows "Next, Next, Done" install wizard style. +Execution of the scripts requires the +.IR makensis (1) +command, generally available from the nsis package on Linux +distributions. +.PP +The scripts package the beat configuration files, the executable +command and license files. On installation, the files are copied to +the Program Files directory. A standard windows service is registered +which starts the beat's exe file. +.B uninstall.exe +removes the installation directory and removes the service from the +windows service registry. +.PP +.I mkbeatinstaller +will download the compiled Windows distribution of +.I beat +from Elastic, then run the matching beat installer generation script. +.SH EXAMPLE +Make installers for filebeat and winlogbeat: +.EX +mkbeatinstaller filebeat winlogbeat +.EE +.SH FILES +.B C:/Program Files/$beat +installation directory +.br +.B C:/Program Files/$beat/uninstall.exe +uninstallation program +.SH SOURCE +http://github.com/ollytom/mkbeatinstaller +.SH SEE ALSO +.IR makensis (1) blob - /dev/null blob + 33049a1ad24d4d147ddb80672d5b25e2ec17c85f (mode 755) --- /dev/null +++ mkfilebeatinstaller @@ -0,0 +1,33 @@ +#!/usr/bin/makensis + +Name "filebeat" +RequestExecutionLevel admin +InstallDir "$PROGRAMFILES64\filebeat" +OutFile "install.exe" + +; Use the "classic" theme since there are no dependencies. +Page directory +Page instfiles + +Section "install" + SetOutPath "$INSTDIR" + + File LICENSE.txt + File NOTICE.txt + File README.md + File fields.yml + File filebeat.yml + File filebeat.exe + File filebeat.reference.yml + + WriteUninstaller "$INSTDIR\uninstall.exe" + + ExecWait 'sc create filebeat start= delayed-auto binPath= "\"$INSTDIR\filebeat.exe\" -c \"$INSTDIR\filebeat.yml\" -path.home \"$INSTDIR\" -path.data C:\ProgramData\filebeat -path.logs C:\ProgramData\filebeat\logs"' + ExecWait 'net start filebeat' +SectionEnd + +Section "uninstall" + ExecWait 'net stop filebeat' + ExecWait 'sc delete filebeat' + RMDir /r "$INSTDIR" +SectionEnd blob - /dev/null blob + fe0a20345802e4db7da45c25537729ddcbb18866 (mode 755) --- /dev/null +++ mkwinlogbeatinstaller @@ -0,0 +1,33 @@ +#!/usr/bin/makensis + +Name "winlogbeat" +RequestExecutionLevel admin +InstallDir "$PROGRAMFILES64\winlogbeat" +OutFile "install.exe" + +; Use the "classic" theme since there are no dependencies. +Page directory +Page instfiles + +Section "install" + SetOutPath "$INSTDIR" + + File LICENSE.txt + File NOTICE.txt + File README.md + File fields.yml + File winlogbeat.yml + File winlogbeat.exe + File winlogbeat.reference.yml + + WriteUninstaller "$INSTDIR\uninstall.exe" + + ExecWait 'sc create winlogbeat start= delayed-auto binPath= "\"$INSTDIR\winlogbeat.exe\" -c \"$INSTDIR\winlogbeat.yml\" -path.home \"$INSTDIR\" -path.data C:\ProgramData\winlogbeat -path.logs C:\ProgramData\winlogbeat\logs"' + ExecWait 'net start winlogbeat' +SectionEnd + +Section "uninstall" + ExecWait 'net stop winlogbeat' + ExecWait 'sc delete winlogbeat' + RMDir /r "$INSTDIR" +SectionEnd \ No newline at end of file