mirror of
https://github.com/gmemstr/pogo.git
synced 2024-09-20 01:31:09 +01:00
Outright remove lockfile.
This commit is contained in:
parent
59a3df81d6
commit
fd4cb338cc
4
setup.go
4
setup.go
|
@ -40,7 +40,7 @@ func Setup() {
|
||||||
go GenerateRss()
|
go GenerateRss()
|
||||||
|
|
||||||
// Create "first run" lockfile when function exits
|
// Create "first run" lockfile when function exits
|
||||||
defer LockFile()
|
// defer LockFile()
|
||||||
|
|
||||||
// Create users SQLite3 file
|
// Create users SQLite3 file
|
||||||
CreateDatabase()
|
CreateDatabase()
|
||||||
|
@ -126,7 +126,7 @@ func CreateDatabase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func LockFile() {
|
func LockFile() {
|
||||||
lock, err := os.Create("assets/.lock")
|
lock, err := os.Create(".lock")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error: %v", err)
|
fmt.Println("Error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ func main() {
|
||||||
|
|
||||||
// Check if this is the first time Pogo has been run
|
// Check if this is the first time Pogo has been run
|
||||||
// with a lockfile
|
// with a lockfile
|
||||||
if _, err := os.Stat("assets/.lock"); err != nil {
|
if _, err := os.Stat("assets"); os.IsNotExist(err) {
|
||||||
fmt.Println("This looks like your first time running Pogo, give me a second to set myself up.")
|
fmt.Println("This looks like your first time running Pogo, give me a second to set myself up.")
|
||||||
Setup()
|
Setup()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue