mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
panic on already running
This commit is contained in:
parent
d5e13d4e27
commit
e927fd5a64
@ -33,7 +33,7 @@ func setLock(locked bool) error {
|
|||||||
if locked {
|
if locked {
|
||||||
running := lock.GetBool("running")
|
running := lock.GetBool("running")
|
||||||
if running {
|
if running {
|
||||||
return errors.New("an instance is already running")
|
panic(errors.New("an instance is already running"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lock.Set("running", locked)
|
lock.Set("running", locked)
|
||||||
|
Loading…
Reference in New Issue
Block a user