diff options
author | Thomas Boerger <thomas@webhippie.de> | 2017-03-15 13:30:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 13:30:00 +0100 |
commit | a06c3ad2c02a5473184711be6dbf1b30f0299e11 (patch) | |
tree | ce0ac065a6afa843ce298d00d1761b5cf48accf9 /scripts | |
parent | 09fe4a2ae9dfa8b3bc8a5039d0feab1e1a34d07b (diff) | |
download | gitea-a06c3ad2c02a5473184711be6dbf1b30f0299e11.tar.gz gitea-a06c3ad2c02a5473184711be6dbf1b30f0299e11.zip |
Synced gitignores with github repo (#1245)
* Renamed scripts directory into contrib
* Added script to download gitignores from github
* Synced gitignores with github repo
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/README | 1 | ||||
-rwxr-xr-x | scripts/autoboot.sh | 2 | ||||
-rw-r--r-- | scripts/generate-gitignores.go | 96 | ||||
-rw-r--r-- | scripts/init/centos/gitea | 93 | ||||
-rw-r--r-- | scripts/init/debian/gitea | 86 | ||||
-rw-r--r-- | scripts/init/freebsd/gitea | 47 | ||||
-rw-r--r-- | scripts/init/gentoo/gitea | 15 | ||||
-rwxr-xr-x | scripts/init/openbsd/gitea | 19 | ||||
-rw-r--r-- | scripts/init/suse/gitea | 115 | ||||
-rw-r--r-- | scripts/launchd/io.gitea.web.plist | 39 | ||||
-rwxr-xr-x | scripts/migrate/gogs_migrate.sh | 206 | ||||
-rw-r--r-- | scripts/mysql.sql | 2 | ||||
-rw-r--r-- | scripts/supervisor/gitea | 16 | ||||
-rw-r--r-- | scripts/systemd/gitea.service | 26 | ||||
-rw-r--r-- | scripts/windows/install-as-service.bat | 25 |
15 files changed, 96 insertions, 692 deletions
diff --git a/scripts/README b/scripts/README deleted file mode 100644 index fddd5ac901..0000000000 --- a/scripts/README +++ /dev/null @@ -1 +0,0 @@ -All files in subdirectories are templates, do modifications based on your environment first.
\ No newline at end of file diff --git a/scripts/autoboot.sh b/scripts/autoboot.sh deleted file mode 100755 index eb16d58170..0000000000 --- a/scripts/autoboot.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -su git -c "/home/git/gogs/scripts/gogs_supervisord.sh restart" diff --git a/scripts/generate-gitignores.go b/scripts/generate-gitignores.go new file mode 100644 index 0000000000..471152c907 --- /dev/null +++ b/scripts/generate-gitignores.go @@ -0,0 +1,96 @@ +// +build !build + +package main + +import ( + "archive/tar" + "compress/gzip" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "os" + "path" + "path/filepath" + "strings" +) + +var ( + prefix = "gitea-gitignore" + url = "https://api.github.com/repos/github/gitignore/tarball" + destination = "" +) + +func init() { + flag.StringVar(&destination, "dest", "options/gitignore/", "destination for the gitignores") +} + +func main() { + flag.Parse() + + file, err := ioutil.TempFile(os.TempDir(), prefix) + + if err != nil { + log.Fatalf("Failed to create temp file. %s", err) + } + + defer os.Remove(file.Name()) + + resp, err := http.Get(url) + + if err != nil { + log.Fatalf("Failed to download archive. %s", err) + } + + defer resp.Body.Close() + + if _, err := io.Copy(file, resp.Body); err != nil { + log.Fatalf("Failed to copy archive to file. %s", err) + } + + if _, err := file.Seek(0, 0); err != nil { + log.Fatalf("Failed to reset seek on archive. %s", err) + } + + gz, err := gzip.NewReader(file) + + if err != nil { + log.Fatalf("Failed to gunzip the archive. %s", err) + } + + tr := tar.NewReader(gz) + + for { + hdr, err := tr.Next() + + if err == io.EOF { + break + } + + if err != nil { + log.Fatalf("Failed to iterate archive. %s", err) + } + + if filepath.Ext(hdr.Name) != ".gitignore" { + continue + } + + out, err := os.Create(path.Join(destination, strings.TrimSuffix(filepath.Base(hdr.Name), ".gitignore"))) + + if err != nil { + log.Fatalf("Failed to create new file. %s", err) + } + + defer out.Close() + + if _, err := io.Copy(out, tr); err != nil { + log.Fatalf("Failed to write new file. %s", err) + } else { + fmt.Printf("Written %s\n", out.Name()) + } + } + + fmt.Println("Done") +} diff --git a/scripts/init/centos/gitea b/scripts/init/centos/gitea deleted file mode 100644 index c24fc1f01e..0000000000 --- a/scripts/init/centos/gitea +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -# -# /etc/rc.d/init.d/gitea -# -# Runs the Gitea Git with a cup of tea. -# -# -# chkconfig: - 85 15 -# - -### BEGIN INIT INFO -# Provides: gitea -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start gitea at boot time. -# Description: Control gitea. -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -# Default values - -NAME=gitea -GITEA_HOME=/home/git/gitea -GITEA_PATH=${GITEA_HOME}/$NAME -GITEA_USER=git -SERVICENAME="Gitea - Git with a cup of tea" -LOCKFILE=/var/lock/subsys/gitea -LOGPATH=${GITEA_HOME}/log -LOGFILE=${LOGPATH}/gitea.log -RETVAL=0 - -# Read configuration from /etc/sysconfig/gitea to override defaults -[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME - -# Don't do anything if nothing is installed -[ -x ${GITEA_PATH} ] || exit 0 -# exit if logpath dir is not created. -[ -x ${LOGPATH} ] || exit 0 - -DAEMON_OPTS="--check $NAME" - -# Set additional options, if any -[ ! -z "$GITEA_USER" ] && DAEMON_OPTS="$DAEMON_OPTS --user=${GITEA_USER}" - -start() { - cd ${GITEA_HOME} - echo -n "Starting ${SERVICENAME}: " - daemon $DAEMON_OPTS "${GITEA_PATH} web > ${LOGFILE} 2>&1 &" - RETVAL=$? - echo - [ $RETVAL = 0 ] && touch ${LOCKFILE} - - return $RETVAL -} - -stop() { - cd ${GITEA_HOME} - echo -n "Shutting down ${SERVICENAME}: " - killproc ${NAME} - RETVAL=$? - echo - [ $RETVAL = 0 ] && rm -f ${LOCKFILE} -} - -case "$1" in - start) - status ${NAME} > /dev/null 2>&1 && exit 0 - start - ;; - stop) - stop - ;; - status) - status ${NAME} - ;; - restart) - stop - start - ;; - reload) - stop - start - ;; - *) - echo "Usage: ${NAME} {start|stop|status|restart}" - exit 1 - ;; -esac -exit $RETVAL diff --git a/scripts/init/debian/gitea b/scripts/init/debian/gitea deleted file mode 100644 index 0cde38a6bd..0000000000 --- a/scripts/init/debian/gitea +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: gitea -# Required-Start: $syslog $network -# Required-Stop: $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: A self-hosted Git service written in Go. -# Description: A self-hosted Git service written in Go. -### END INIT INFO - -# Author: Danny Boisvert - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="Go Git Service" -NAME=gitea -SERVICEVERBOSE=yes -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -WORKINGDIR=/home/git/gitea -DAEMON=$WORKINGDIR/$NAME -DAEMON_ARGS="web" -USER=git -USERBIND="setcap cap_net_bind_service=+ep" -STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}" - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -do_start() -{ - $USERBIND $DAEMON - sh -c "USER=$USER start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\ - --background --chdir $WORKINGDIR --chuid $USER \\ - --exec $DAEMON -- $DAEMON_ARGS" -} - -do_stop() -{ - start-stop-daemon --stop --quiet --retry=$STOP_SCHEDULE --pidfile $PIDFILE --name $NAME --oknodo - rm -f $PIDFILE -} - -do_status() -{ - if [ -f $PIDFILE ]; then - if kill -0 $(cat "$PIDFILE"); then - echo "$NAME is running, PID is $(cat $PIDFILE)" - else - echo "$NAME process is dead, but pidfile exists" - fi - else - echo "$NAME is not running" - fi -} - -case "$1" in - start) - echo "Starting $DESC" "$NAME" - do_start - ;; - stop) - echo "Stopping $DESC" "$NAME" - do_stop - ;; - status) - do_status - ;; - restart) - echo "Restarting $DESC" "$NAME" - do_stop - do_start - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2 - exit 2 - ;; -esac - -exit 0 diff --git a/scripts/init/freebsd/gitea b/scripts/init/freebsd/gitea deleted file mode 100644 index 898606f35f..0000000000 --- a/scripts/init/freebsd/gitea +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: gitea -# REQUIRE: NETWORKING SYSLOG -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable gitea: -# -#gitea_enable="YES" - -. /etc/rc.subr - -name="gitea" -rcvar="gitea_enable" - -load_rc_config $name - -: ${gitea_user:="git"} -: ${gitea_enable:="NO"} -: ${gitea_directory:="/home/git"} - -command="${gitea_directory}/gitea web" -procname="$(echo $command |cut -d' ' -f1)" - -pidfile="${gitea_directory}/${name}.pid" - -start_cmd="${name}_start" -stop_cmd="${name}_stop" - -gitea_start() { - cd ${gitea_directory} - export USER=${gitea_user} - export HOME=/usr/home/${gitea_user} - /usr/sbin/daemon -f -u ${gitea_user} -p ${pidfile} $command -} - -gitea_stop() { - if [ ! -f $pidfile ]; then - echo "GITEA PID File not found. Maybe GITEA is not running?" - else - kill $(cat $pidfile) - fi -} - -run_rc_command "$1" diff --git a/scripts/init/gentoo/gitea b/scripts/init/gentoo/gitea deleted file mode 100644 index d8c150d417..0000000000 --- a/scripts/init/gentoo/gitea +++ /dev/null @@ -1,15 +0,0 @@ -#!/sbin/openrc-run - -DIR=/home/git/gitea -USER=git - -start_stop_daemon_args="--user ${USER} --chdir ${DIR}" -command="${DIR}/gitea" -command_args="web" -command_background=yes -pidfile=/var/run/gitea.pid - -depend() -{ - need net -} diff --git a/scripts/init/openbsd/gitea b/scripts/init/openbsd/gitea deleted file mode 100755 index c43190b558..0000000000 --- a/scripts/init/openbsd/gitea +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# $OpenBSD$ - -daemon="/home/git/gitea/gitea" -daemon_user="git" -daemon_flags="web" - -gitea_directory="/home/git/gitea" - -rc_bg=YES - -. /etc/rc.d/rc.subr - -rc_start() { - ${rcexec} "cd ${gitea_directory}; ${daemon} ${daemon_flags} ${_bg}" -} - -rc_cmd $1 diff --git a/scripts/init/suse/gitea b/scripts/init/suse/gitea deleted file mode 100644 index 77fb6689cf..0000000000 --- a/scripts/init/suse/gitea +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh -# -# /etc/init.d/gitea -# -# Runs the Gitea Git with a cup of tea. -# - -### BEGIN INIT INFO -# Provides: gitea -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start gitea at boot time. -# Description: Control gitea. -### END INIT INFO - -# Default values - -NAME=gitea -GITEA_HOME=/home/git/gitea -GITEA_PATH=${GITEA_HOME}/$NAME -GITEA_USER=git -SERVICENAME="Git - with a cup of tea" -LOCKFILE=/var/lock/subsys/gitea -LOGPATH=${GITEA_HOME}/log -LOGFILE=${LOGPATH}/error.log -# gitea creates its own gitea.log from stdout -RETVAL=0 - -# Read configuration from /etc/sysconfig/gitea to override defaults -[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME - -# Don't do anything if nothing is installed -test -x ${GITEA_PATH} || { echo "$NAME not installed"; - if [ "$1" = "stop" ]; then exit 0; - else exit 5; fi; } - -# exit if logpath dir is not created. -test -r ${LOGPATH} || { echo "$LOGPATH not existing"; - if [ "$1" = "stop" ]; then exit 0; - else exit 6; fi; } - -# Source function library. -. /etc/rc.status - -# Reset status of this service -rc_reset - - -case "$1" in - start) - echo -n "Starting ${SERVICENAME} " - - # As we can't use startproc, we have to check ourselves if the service is already running - /sbin/checkproc ${GITEA_PATH} - if [ $? -eq 0 ]; then - # return skipped as service is already running - (exit 5) - else - su - ${GITEA_USER} -c "USER=${GITEA_USER} ${GITEA_PATH} web 2>&1 >>${LOGFILE} &" - fi - - # Remember status and be verbose - rc_status -v - ;; - - stop) - echo -n "Shutting down ${SERVICENAME} " - - ## Stop daemon with killproc(8) and if this fails - ## killproc sets the return value according to LSB. - /sbin/killproc ${GITEA_PATH} - - # Remember status and be verbose - rc_status -v - ;; - - restart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - $0 stop - $0 start - - # Remember status and be quiet - rc_status - ;; - - status) - echo -n "Checking for ${SERVICENAME} " - ## Check status with checkproc(8), if process is running - ## checkproc will return with exit status 0. - - # Return value is slightly different for the status command: - # 0 - service up and running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running (unused) - # 4 - service status unknown :-( - # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) - - # NOTE: checkproc returns LSB compliant status values. - /sbin/checkproc ${GITEA_PATH} - # NOTE: rc_status knows that we called this init script with - # "status" option and adapts its messages accordingly. - rc_status -v - ;; - - *) - echo "Usage: $0 {start|stop|status|restart}" - exit 1 - ;; - -esac -rc_exit diff --git a/scripts/launchd/io.gitea.web.plist b/scripts/launchd/io.gitea.web.plist deleted file mode 100644 index 43ec612b07..0000000000 --- a/scripts/launchd/io.gitea.web.plist +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> - <dict> - <key>Label</key> - <string>io.gitea.web</string> - <!-- assumes Gitea is running under 'git' account --> - <!-- modify below to reflect your settings --> - <key>UserName</key> - <string>git</string> - <key>GroupName</key> - <string>git</string> - <key>ProgramArguments</key> - <array> - <!-- assumes Gitea is installed in /Users/git/gitea --> - <!-- modify below to reflect your settings --> - <string>/Users/git/gitea/gitea</string> - <string>web</string> - </array> - <key>RunAtLoad</key> - <true/> - <key>KeepAlive</key> - <true/> - <!-- assumes Gitea is installed in /Users/git/gitea --> - <!-- modify below to reflect your settings --> - <key>WorkingDirectory</key> - <string>/Users/git/gitea/</string> - <key>StandardOutPath</key> - <string>/Users/git/gitea/log/stdout.log</string> - <key>StandardErrorPath</key> - <string>/Users/git/gitea/log/stderr.log</string> - <!-- default 256 is too low for Gitea needs using parallel pipes --> - <key>SoftResourceLimits</key> - <dict> - <key>NumberOfFiles</key> - <integer>8192</integer> - </dict> - </dict> -</plist> diff --git a/scripts/migrate/gogs_migrate.sh b/scripts/migrate/gogs_migrate.sh deleted file mode 100755 index e9bb5aa02e..0000000000 --- a/scripts/migrate/gogs_migrate.sh +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/bash - -gitea_version=1.0.1 -tested_gogs_version="0.9.114.1227" -gogs_binary=gogs -gitea_binary=gitea -download_gitea=true -gitea_path= - -function usage() { - echo "Optional parameters: [-b Gitea binary] [-i Gitea install dir] [-o gogs binary] [-h help]"; - exit 1; -} - -while getopts ":b::i:o:h:" opt; do - case $opt in - b) - gitea_binary=${OPTARG} - download_gitea=false - ;; - i) - gitea_path=${OPTARG} - ;; - o) - gogs_binary=${OPTARG} - ;; - h) - usage - ;; - \?) - echo -e "Invalid option: -$OPTARG" - exit 1 - ;; - :) - usage - exit 1 - ;; - esac -done - -function exitOnError() { - if [ "$?" != "0" ]; then - echo -e $1 - exit 1 - fi -} - -function checkBinary() { - if [ ! -f $1 ]; then - echo "Unable to find $1" - exit 1 - fi -} - -function continueYN(){ - while true; do - echo -e "$1 Yes or No" - read yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit 1;; - * ) echo "Please answer yes or no.";; - esac - done -} - -########## Binary checks -if pidof "$gogs_binary" >/dev/null; then - echo "Please stop gogs before migrating to Gitea" - exit 1 -fi - -checkBinary "$gogs_binary" - -if [ ! -x "$gogs_binary" ]; then - echo "Please make sure that you are running this script as the gogs user" - exit 1 -fi - -########## Version check -gogs_version=$(./$gogs_binary --version) -original_IFS=$IFS -IFS="." && current_version=(${gogs_version#"Gogs version "}) && minimal_version=($tested_gogs_version) -IFS=$original_IFS - -count=0 -for i in "${current_version[@]}" -do - if [ $i -gt ${minimal_version[$count]} ]; then - echo -e "!!!--WARNING--!!!\nYour $gogs_version is newer than the tested Gogs version $tested_gogs_version\nUse this script on your own risk\n!!!--WARNING--!!!" - break - fi - let count+=1 -done - -########## Disclaimer -continueYN "This migration script creates a backup before it starts with the actual migration -If something goes wrong you could always resotre this backup. -The backups are stored into your gogs folder in gogs-dump-[timestamp].zip file - -Migrating from gogs to gitea, are you sure?" - -########## gogs dump -echo "Creating a backup of gogs, this could take a while..." -./"$gogs_binary" dump -exitOnError "Failed to create a gogs dump" - -########## Create Gitea folder -if [ -z "$gitea_path" ]; then - echo "Where do you want to install Gitea?" - read gitea_path -fi - -if [ ! -d "$gitea_path" ]; then - mkdir -p "$gitea_path" - exitOnError -fi - -if [ "$(ls -A $gitea_path)" ]; then - continueYN "!!!--WARNING--!!!\nDirectory $gitea_path is not empty, do you want to continue?" -fi - - -########## Download Gitea -if [ $download_gitea == true ]; then - - ########## Detect os - case "$OSTYPE" in - darwin*) platform="darwin-10.6";; - linux*) platform="linux" ;; - freebsd*) platform="bsd" ;; - netbsd*) platform="bsd" ;; - openbsd*) platform="bsd" ;; - *) echo "Unsupported os: $OSTYPE\n Please download/compile your own binary and run this script with the -b option" exit 1;; - esac - - arch="" - bits="" - if [[ "$platform" == "linux" ]] || [[ "$platform" == "bsd" ]]; then - arch="$(uname -m | sed -e 's/arm\(.*\)/arm-\1/' -e s/aarch64.*/arm64/)" - fi - - if [[ "$platform" == "bsd" ]] && [[ "$arch" != "arm"* ]]; then - echo "Currently Gitea only supports arm prebuilt binarys on bsd" - exit 1 - fi - - if [[ "$arch" != "arm"* ]] && [[ "$arch" != "mips"* ]]; then - arch="" - case "$(getconf LONG_BIT)" in - 64*) bits="amd64";; - 32*) bits="386" ;; - esac - fi - - ########## Wget Gitea - echo "Downloading Gitea" - file="gitea-$gitea_version-$platform-$arch$bits" - url="https://dl.gitea.io/gitea/$gitea_version/$file" - wget "$url" -P "$gitea_path" - exitOnError "Failed to download $url" - - wget "$url.sha256" -P "$gitea_path" - exitOnError "Failed to Gitea checksum $url.sha256" - - echo "Comparing checksums" - gogs_dir=$(pwd) - cd "$gitea_path" - - sha256sum -c "$file.sha256" - exitOnError "Downloaded Gitea checksums do not match" - - rm "$file.sha256" - mv "$file" gitea - cd "$gogs_dir" - -else - checkBinary "$gitea_binary" - if [ "$gitea_binary" != "$gitea_path/gitea" ];then - cp "$gitea_binary" "$gitea_path/gitea" - fi -fi - -########## Copy gogs data to Gitea folder -echo "Copying gogs data to Gitea, this could take a while..." -cp -R custom "$gitea_path" -cp -R data "$gitea_path" -#cp -R conf "$gitea_path" - -########## Moving & deleting old files -#mv $gitea_path/conf $gitea_path/options -cd "$gitea_path" -mv "custom/conf/app.ini" "custom/conf/gogs_app.ini" -url="https://raw.githubusercontent.com/go-gitea/gitea/v$gitea_version/conf/app.ini" -wget "$url" -P "custom/conf/" -exitOnError "Unable to download Gitea app.ini" -rm -f conf/README.md - -echo -e "Migration is almost complete, you only need to merge custom/conf/gogs_app.ini into custom/conf/app.ini" -continueYN "Do you want to start Gitea?" - -########## Starting Gitea -echo "Starting Gitea" -chmod +x gitea -./gitea web -exitOnError "Failed to start Gitea"
\ No newline at end of file diff --git a/scripts/mysql.sql b/scripts/mysql.sql deleted file mode 100644 index aad8beddfa..0000000000 --- a/scripts/mysql.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP DATABASE IF EXISTS gitea; -CREATE DATABASE IF NOT EXISTS gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/scripts/supervisor/gitea b/scripts/supervisor/gitea deleted file mode 100644 index a8a908d50b..0000000000 --- a/scripts/supervisor/gitea +++ /dev/null @@ -1,16 +0,0 @@ -[program:gitea] -directory=/home/git/go/src/github.com/go-gitea/gitea/ -command=/home/git/go/src/github.com/go-gitea/gitea/gitea web -autostart=true -autorestart=true -startsecs=10 -stdout_logfile=/var/log/gitea/stdout.log -stdout_logfile_maxbytes=1MB -stdout_logfile_backups=10 -stdout_capture_maxbytes=1MB -stderr_logfile=/var/log/gitea/stderr.log -stderr_logfile_maxbytes=1MB -stderr_logfile_backups=10 -stderr_capture_maxbytes=1MB -user = git -environment = HOME="/home/git", USER="git"
\ No newline at end of file diff --git a/scripts/systemd/gitea.service b/scripts/systemd/gitea.service deleted file mode 100644 index 758f1590f1..0000000000 --- a/scripts/systemd/gitea.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=Gitea (Git with a cup of tea) -After=syslog.target -After=network.target -#After=mysqld.service -#After=postgresql.service -#After=memcached.service -#After=redis.service - -[Service] -# Modify these two values and uncomment them if you have -# repos with lots of files and get an HTTP error 500 because -# of that -### -#LimitMEMLOCK=infinity -#LimitNOFILE=65535 -Type=simple -User=git -Group=git -WorkingDirectory=/home/git/gitea -ExecStart=/home/git/gitea/gitea web -Restart=always -Environment=USER=git HOME=/home/git - -[Install] -WantedBy=multi-user.target diff --git a/scripts/windows/install-as-service.bat b/scripts/windows/install-as-service.bat deleted file mode 100644 index 4a513b7dcb..0000000000 --- a/scripts/windows/install-as-service.bat +++ /dev/null @@ -1,25 +0,0 @@ -@ECHO off - -:: This script relies on nssm.exe to work. -:: Please, download it and make it available on the system path, -:: or copy it to the gogs path. -:: https://nssm.cc/download -:: This script itself should run in the gogs path, too. -:: In case of startup failure, please read carefully the log file. -:: Make sure Gitea work running manually with "gitea web" before running -:: this script. -:: And, please, read carefully the installation docs first: -:: https://gogs.io/docs/installation -:: To unistall the service, run "nssm remove gogs" and restart Windows. - -:: Set the folder where you extracted Gitea. Omit the last slash. -SET gogspath=C:\gogs - -nssm install gogs "%gogspath%\gogs.exe" -nssm set gogs AppParameters "web" -nssm set gogs Description "A painless self-hosted Git service." -nssm set gogs DisplayName "Gitea - Git with a cup of tea" -nssm set gogs Start SERVICE_DELAYED_AUTO_START -nssm set gogs AppStdout "%gogspath%\gogs.log" -nssm start gogs -pause |