1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Adding cps.conf to encapsulate the variables in systemd unit

This commit is contained in:
Arky 2018-08-15 17:40:03 +07:00
parent 2d15cea37c
commit 38b71f274d
3 changed files with 6 additions and 2 deletions

View file

@ -32,6 +32,8 @@
with_items:
- { src: 'calibre-web.service.j2', dest: '/etc/systemd/system/calibre-web.service', mode: '0644' }
- { src: 'calibre-web.conf.j2', dest: '/etc/apache2/sites-available/calibre-web.conf', mode: '0644' }
- { src: 'cps.conf.j2', dest: "{{ calibreweb_home }}/cps.conf" , mode: '0644' }
- name: Provision calibre-web with default administration account and database.
copy:

View file

@ -2,9 +2,9 @@ Description=Calibre-Web
[Service]
Type=simple
Environment=CALIBRE_DBPATH={{ calibreweb_home }}
User={{ calibreweb_user }}
ExecStart=/usr/bin/python {{ calibreweb_exec_path }}
EnvironmentFile={{ calibreweb_home }}/cps.conf
ExecStart=/usr/bin/python {{ calibreweb_exec_path }} $ARG1 $ARG2
WorkingDirectory={{ calibreweb_path }}
[Install]

View file

@ -0,0 +1,2 @@
ARG1 = -p
ARG2 = {{ calibreweb_home }}/{{ calibreweb_database }}