Add postgresql.restart()
convenience function
This commit is contained in:
parent
6b01b0d70d
commit
b9c8a8d104
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -24,8 +24,6 @@
|
|||
Fabric Library for PostgreSQL
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import os
|
||||
|
||||
from rattail_fabric2 import apt
|
||||
|
@ -38,6 +36,13 @@ def install(c):
|
|||
apt.install(c, 'postgresql')
|
||||
|
||||
|
||||
def restart(c):
|
||||
"""
|
||||
Restart the PostgreSQL database service
|
||||
"""
|
||||
c.sudo('systemctl restart postgresql.service')
|
||||
|
||||
|
||||
def sql(c, sql, database='', port=None):
|
||||
"""
|
||||
Execute some SQL as the 'postgres' user.
|
||||
|
|
Loading…
Reference in a new issue