mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
reverted back to original sqlite database location
This commit is contained in:
parent
5d00c3f6ce
commit
c20f563330
4 changed files with 4 additions and 79 deletions
2
Makefile
2
Makefile
|
@ -45,6 +45,8 @@ lessc:
|
|||
# creates a debian package for drone to install
|
||||
# `sudo dpkg -i drone.deb`
|
||||
deb:
|
||||
mkdir -p debian/drone/usr/local/bin
|
||||
mkdir -p debian/drone/var/lib/drone
|
||||
dpkg-deb --build debian/drone
|
||||
|
||||
deploy:
|
||||
|
|
2
debian/drone/DEBIAN/control
vendored
2
debian/drone/DEBIAN/control
vendored
|
@ -1,5 +1,5 @@
|
|||
Package: drone
|
||||
Version: 0.1
|
||||
Version: 0.3
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
|
4
debian/drone/etc/init/drone.conf
vendored
4
debian/drone/etc/init/drone.conf
vendored
|
@ -1,11 +1,9 @@
|
|||
start on (filesystem and net-device-up)
|
||||
|
||||
chdir /var/lib/drone
|
||||
console log
|
||||
|
||||
script
|
||||
mkdir -p /root/.drone
|
||||
cd /root/.drone
|
||||
|
||||
DRONED_OPTS="--port=:80"
|
||||
if [ -f /etc/default/$UPSTART_JOB ]; then
|
||||
. /etc/default/$UPSTART_JOB
|
||||
|
|
|
@ -3,11 +3,7 @@ package main
|
|||
import (
|
||||
"database/sql"
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
|
@ -154,74 +150,3 @@ func setupQueue() {
|
|||
func setupHandlers() {
|
||||
|
||||
}
|
||||
|
||||
// initialize the .drone directory and create a skeleton config
|
||||
// file if one does not already exist.
|
||||
func init() {
|
||||
// load the current user
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// set .drone home dir
|
||||
home = filepath.Join(u.HomeDir, ".drone")
|
||||
|
||||
// create the .drone home directory
|
||||
os.MkdirAll(home, 0777)
|
||||
|
||||
// check for the config file
|
||||
filename := filepath.Join(u.HomeDir, ".drone", "config.toml")
|
||||
if _, err := os.Stat(filename); err != nil {
|
||||
// if not exists, create
|
||||
ioutil.WriteFile(filename, []byte(defaultConfig), 0777)
|
||||
}
|
||||
}
|
||||
|
||||
var defaultConfig = `
|
||||
# Enables user self-registration. If false, the system administrator
|
||||
# will need to manually add users to the system.
|
||||
registration = true
|
||||
|
||||
[smtp]
|
||||
host = ""
|
||||
port = ""
|
||||
from = ""
|
||||
username = ""
|
||||
password = ""
|
||||
|
||||
[bitbucket]
|
||||
url = "https://bitbucket.org"
|
||||
api = "https://bitbucket.org"
|
||||
client = ""
|
||||
secret = ""
|
||||
enabled = false
|
||||
|
||||
[github]
|
||||
url = "https://github.com"
|
||||
api = "https://api.github.com"
|
||||
client = ""
|
||||
secret = ""
|
||||
enabled = false
|
||||
|
||||
[githubenterprise]
|
||||
url = ""
|
||||
api = ""
|
||||
client = ""
|
||||
secret = ""
|
||||
enabled = false
|
||||
|
||||
[gitlab]
|
||||
url = ""
|
||||
api = ""
|
||||
client = ""
|
||||
secret = ""
|
||||
enabled = false
|
||||
|
||||
[stash]
|
||||
url = ""
|
||||
api = ""
|
||||
client = ""
|
||||
secret = ""
|
||||
enabled = false
|
||||
`
|
||||
|
|
Loading…
Reference in a new issue