Rewrite Travis script to be modular

Fixes: #1039
This commit is contained in:
Kyle Robbertze 2020-05-13 17:10:14 +02:00
parent 4792f3a616
commit afd3d7842b
6 changed files with 121 additions and 122 deletions

View file

@ -1,3 +1,4 @@
from pathlib import Path
from setuptools import setup
from subprocess import call
import os
@ -28,7 +29,9 @@ else:
def postinst():
if not no_init:
initd = Path("/etc/init.d/airtime-celery")
conf = Path("/etc/default/airtime-celery")
if not no_init and initd.is_file() and conf.is_file():
# Make /etc/init.d file executable and set proper
# permissions for the defaults config file
os.chmod("/etc/init.d/airtime-celery", 0o755)