Fix ipfs.service template and few stuff
This commit is contained in:
parent
c031e76fb0
commit
a23cb3a92c
|
@ -9,7 +9,7 @@ isARM=$(uname -a | grep arm)
|
||||||
##################################
|
##################################
|
||||||
## INSTALL TOOLS
|
## INSTALL TOOLS
|
||||||
######## YOUTUBE-DL ##########
|
######## YOUTUBE-DL ##########
|
||||||
sudo wget -P $MY_PATH https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
|
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
|
||||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||||
sudo apt install libid3-tools mpd mpc lame -y
|
sudo apt install libid3-tools mpd mpc lame -y
|
||||||
|
|
||||||
|
@ -26,14 +26,14 @@ sudo apt-get install nginx php-curl php-sqlite3 php-gd php-json php-xml php-mbst
|
||||||
sudo apt-get install lame sox libsox-fmt-mp3 eyed3 python-chardet imagemagick curl -y #libav-tools
|
sudo apt-get install lame sox libsox-fmt-mp3 eyed3 python-chardet imagemagick curl -y #libav-tools
|
||||||
sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc libid3-tools espeak mpg321 fuse atomicparsley -y #libttspico-utils
|
sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc libid3-tools espeak mpg321 fuse atomicparsley -y #libttspico-utils
|
||||||
|
|
||||||
wget -P $MY_PATH http://launchpadlibrarian.net/339874908/libav-tools_3.3.4-2_all.deb -O libav-tools.deb
|
wget http://launchpadlibrarian.net/339874908/libav-tools_3.3.4-2_all.deb -O $MY_PATH/libav-tools.deb
|
||||||
wget -P $MY_PATH http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-data_1.0+git20130326-3_all.deb -O libttspico-data.deb
|
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-data_1.0+git20130326-3_all.deb -O $MY_PATH/libttspico-data.deb
|
||||||
if [[ -z $isARM ]]; then
|
if [[ -z $isARM ]]; then
|
||||||
wget -P $MY_PATH http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-5_amd64.deb -O libttspico0.deb
|
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-5_amd64.deb -O $MY_PATH/libttspico0.deb
|
||||||
wget -P $MY_PATH http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-9_amd64.deb -O libttspico-utils.deb
|
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-9_amd64.deb -O $MY_PATH/libttspico-utils.deb
|
||||||
else
|
else
|
||||||
wget -P $MY_PATH http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-3_armhf.deb -O libttspico0.deb
|
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-3_armhf.deb -O $MY_PATH/libttspico0.deb
|
||||||
wget -P $MY_PATH http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-3_armhf.deb -O libttspico-utils.deb
|
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-3_armhf.deb -O $MY_PATH/libttspico-utils.deb
|
||||||
fi
|
fi
|
||||||
sudo dpkg -i $MY_PATH/libttspico-data.deb
|
sudo dpkg -i $MY_PATH/libttspico-data.deb
|
||||||
sudo dpkg -i $MY_PATH/libttspico0.deb
|
sudo dpkg -i $MY_PATH/libttspico0.deb
|
||||||
|
|
|
@ -13,11 +13,11 @@ sudo apt install python3-pip libsodium18 -y
|
||||||
pip3 install silkaj
|
pip3 install silkaj
|
||||||
|
|
||||||
# Install IPFS
|
# Install IPFS
|
||||||
[[ ! -z $(which /usr/local/bin/ipfs) ]] && sudo service ipfs stop
|
[[ ! -z $(ls /usr/local/bin/ipfs) ]] && sudo service ipfs stop
|
||||||
if [[ -z $isARM ]]; then
|
if [[ -z $isARM ]]; then
|
||||||
wget -P $MY_PATH https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-amd64.tar.gz -O ipfs-update.tar.gz
|
wget https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-amd64.tar.gz -O $MY_PATH/ipfs-update.tar.gz
|
||||||
else
|
else
|
||||||
wget -P $MY_PATH https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-arm.tar.gz -O ipfs-update.tar.gz
|
wget https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-arm.tar.gz -O $MY_PATH/ipfs-update.tar.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "INSTALL ipfs-update"
|
echo "INSTALL ipfs-update"
|
||||||
|
@ -31,7 +31,7 @@ echo "INSTALL latest ipfs"
|
||||||
sudo ipfs-update install latest
|
sudo ipfs-update install latest
|
||||||
|
|
||||||
echo "CREATE SYSTEMD ipfs SERVICE"
|
echo "CREATE SYSTEMD ipfs SERVICE"
|
||||||
[[ ! -z $(which /etc/systemd/system/ipfs.service) ]] && sudo rm /etc/systemd/system/ipfs.service
|
[[ ! -z $(ls /etc/systemd/system/ipfs.service) ]] && sudo rm /etc/systemd/system/ipfs.service
|
||||||
sudo cp -f $MY_PATH/templates/ipfs.service /etc/systemd/system/
|
sudo cp -f $MY_PATH/templates/ipfs.service /etc/systemd/system/
|
||||||
sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service
|
sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=IPFS daemon
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=pi
|
User=_USER
|
||||||
ExecStart=/usr/local/bin/ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub --routing=dhtclient --enable-gc
|
ExecStart=/usr/local/bin/ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub --routing=dhtclient --enable-gc
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@ MY_PATH="`dirname \"$0\"`" # relative
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
init_loc="$MY_PATH/shell/init.sh"
|
init_loc="$MY_PATH/shell/init.sh"
|
||||||
|
|
||||||
|
## Update G1sms+ code
|
||||||
|
git pull
|
||||||
|
|
||||||
now=$(date +%Y-%m-%d)
|
now=$(date +%Y-%m-%d)
|
||||||
chmod u+x .install/configure_ipfs_layer.sh .install/install_requirements.sh .install/install_optional.sh
|
chmod u+x .install/configure_ipfs_layer.sh .install/install_requirements.sh .install/install_optional.sh
|
||||||
|
|
||||||
|
@ -18,10 +21,10 @@ if [ "$EUID" -eq 0 ]
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Ce script configure votre noeud G1sms+"
|
[[ -z $(which ipfs) ]] && echo "IPFS n'a pas été détecté sur votre machine, nous allons installer tous les prérequis..." && $MY_PATH/.install/install_requirements.sh && $MY_PATH/.install/configure_ipfs_layer.sh
|
||||||
IPFS=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
|
||||||
|
|
||||||
[[ -z $IPFS ]] && echo "IPFS n'a pas été détecté sur votre machine, nous allons installer tous les prérequis..." && $MY_PATH/.install/install_requirements.sh && $MY_PATH/.install/configure_ipfs_layer.sh
|
echo "Ce script va désormais configurer votre noeud G1sms+"
|
||||||
|
IPFS=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||||
|
|
||||||
if [[ -f $MY_PATH/.install/templates/init.sh ]]; then
|
if [[ -f $MY_PATH/.install/templates/init.sh ]]; then
|
||||||
echo "Quel est l'utilisateur du système IPFS (détecté: $IPFS)?"
|
echo "Quel est l'utilisateur du système IPFS (détecté: $IPFS)?"
|
||||||
|
|
Loading…
Reference in New Issue