From 86990a9a907c0144af2978b694ad58c3a41cc000 Mon Sep 17 00:00:00 2001 From: Vincent BENOIT Date: Tue, 15 Nov 2022 20:50:28 +0100 Subject: [PATCH] =?UTF-8?q?modification=20des=20droits=20du=20dossier=20/u?= =?UTF-8?q?sr/share=20et=20suppression=20du=20fichier=20compat=20pour=20la?= =?UTF-8?q?=20cr=C3=A9ation=20du=20paquet=20deb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/changelog | 2 +- template/compat | 1 - template/kineintercommisc.postinst | 15 +++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 template/compat diff --git a/template/changelog b/template/changelog index eac6b33..b41a763 100644 --- a/template/changelog +++ b/template/changelog @@ -1,4 +1,4 @@ -#PACKAGE# (#VERSION#-1) stable; urgency=medium +#PACKAGE# (#VERSION#) stable; urgency=medium * Initial release diff --git a/template/compat b/template/compat deleted file mode 100644 index b4de394..0000000 --- a/template/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/template/kineintercommisc.postinst b/template/kineintercommisc.postinst index c64c6ed..af5c2ac 100644 --- a/template/kineintercommisc.postinst +++ b/template/kineintercommisc.postinst @@ -15,15 +15,26 @@ userpi="pi" dirname="kineintercom" # create conf directory -/usr/bin/mkdir -p /etc/$dirname +if [ ! -d "/etc/$dirname" ]; then + /usr/bin/mkdir -p /etc/$dirname +fi /usr/bin/chown -R $user:$userpi /etc/$dirname /usr/bin/chmod -R 770 /etc/$dirname # create log directory -/usr/bin/mkdir -p /var/log/$dirname +if [ ! -d "/var/log/$dirname" ]; then + /usr/bin/mkdir -p /var/log/$dirname +fi /usr/bin/chown -R $user:$userpi /var/log/$dirname /usr/bin/chmod -R 770 /var/log/$dirname +# create share directory +if [ ! -d "/usr/share/$dirname" ]; then + /usr/bin/mkdir -p /usr/share/$dirname +fi +/usr/bin/chown -R $user:$userpi /usr/share/$dirname +/usr/bin/chmod -R 770 /usr/share/$dirname + # Restart service /usr/bin/systemctl enable kineintercom.service /usr/bin/systemctl restart kineintercom.service