forked from qo-op/G1BILLET
Should help installation... plese try and report issue or make it better
This commit is contained in:
parent
fa16a218d9
commit
1fb8aedb1d
22
install.sh
Executable file
22
install.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
# Author: Fred (support@qo-op.com)
|
||||||
|
# Version: 0.1
|
||||||
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
|
################################################################################
|
||||||
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
ME="${0##*/}"
|
||||||
|
|
||||||
|
echo "#############################################"
|
||||||
|
echo ">>>>>>>>>>> SYSTEMD SETUP "
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
|
sudo apt install python3 python3-pip imagemagick qrencode ttf-mscorefonts-installer netcat-traditional
|
||||||
|
sudo pip3 install duniterpy
|
||||||
|
|
||||||
|
echo "# Correction des droits export PDF imagemagick"
|
||||||
|
if [[ $(cat /etc/ImageMagick-6/policy.xml | grep PDF) ]]; then
|
||||||
|
cat /etc/ImageMagick-6/policy.xml | grep -Ev PDF > /tmp/policy.xml
|
||||||
|
sudo cp /tmp/policy.xml /etc/ImageMagick-6/policy.xml
|
||||||
|
fi
|
39
systemd_setup.sh
Executable file
39
systemd_setup.sh
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
# Author: Fred (support@qo-op.com)
|
||||||
|
# Version: 0.1
|
||||||
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
|
################################################################################
|
||||||
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
ME="${0##*/}"
|
||||||
|
|
||||||
|
echo "#############################################"
|
||||||
|
echo ">>>>>>>>>>> SYSTEMD SETUP "
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
|
echo "CREATE SYSTEMD g1billet SERVICE >>>>>>>>>>>>>>>>>>"
|
||||||
|
cat > /tmp/g1billet.service <<EOF
|
||||||
|
[Unit]
|
||||||
|
Description=G1BILLET API
|
||||||
|
After=network.target
|
||||||
|
Requires=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=_USER_
|
||||||
|
RestartSec=1
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/home/_USER_/.zen/G1BILLET/G1BILLETS.sh daemon
|
||||||
|
StandardOutput=file:/home/_USER_/.zen/tmp/g1billet.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo cp -f /tmp/g1billet.service /etc/systemd/system/
|
||||||
|
sudo sed -i "s/_USER_/$USER/g" /etc/systemd/system/g1billet.service
|
||||||
|
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable g1billet
|
||||||
|
sudo systemctl restart g1billet
|
Loading…
Reference in New Issue
Block a user