Skip to content

Commit

Permalink
Enable voxinup service
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasse committed Sep 6, 2017
1 parent cd07cf9 commit d704663
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 29 deletions.
8 changes: 7 additions & 1 deletion README
@@ -1,5 +1,5 @@
Speakup + voxin on 32 or 64 bits machines
2013, 2016 Gilles Casse <gcasse@oralux.org>
2013, 2017 Gilles Casse <gcasse@oralux.org>

This software installs voxinup [1], the speakup connector for voxin.

Expand All @@ -15,6 +15,12 @@ The uninstall.sh script removes voxinup and enables espeakup instead.

sudo ./install.sh

* Troubleshooting
** voxinup stops talking

Type as root:
systemctl restart voxinup


* [1] voxinup
** sources
Expand Down
62 changes: 34 additions & 28 deletions conf.inc
Expand Up @@ -7,26 +7,26 @@ check_distro()

# Check if this is an arch linux based distro
if [ -e "/etc/pacman.conf" ]; then
check_speakup=arch_check_speakup
check_libvoxin=arch_check_libvoxin
install_connector=arch_install_connector
uninstall_connector=arch_uninstall_connector
status=0
check_speakup=arch_check_speakup
check_libvoxin=arch_check_libvoxin
install_connector=arch_install_connector
uninstall_connector=arch_uninstall_connector
status=0
else
# Check if this is a debian based distro
type dpkg &> /dev/null
if [ "$?" = "0" ]; then
check_speakup=debian_check_speakup
check_libvoxin=debian_check_libvoxin
install_connector=debian_install_connector
uninstall_connector=debian_uninstall_connector
status=0
if [ "$ARCH" = "x86_64" ]; then
ARCH=amd64
else
ARCH=i386
fi
fi
# Check if this is a debian based distro
type dpkg &> /dev/null
if [ "$?" = "0" ]; then
check_speakup=debian_check_speakup
check_libvoxin=debian_check_libvoxin
install_connector=debian_install_connector
uninstall_connector=debian_uninstall_connector
status=0
if [ "$ARCH" = "x86_64" ]; then
ARCH=amd64
else
ARCH=i386
fi
fi
fi
return $status
}
Expand All @@ -45,20 +45,20 @@ arch_install_connector() {
local e=0
pacman -U build/archlinux/voxinup-*-$ARCH.pkg.tar.xz
if [ "$?" != "0" ]; then
return 1
return 1
fi

pacman -Q espeakup &> /dev/null
if [ "$?" = "0" ]; then
e=1
systemctl disable espeakup
e=1
systemctl disable espeakup
fi

systemctl enable voxinup

if [ "$e" = "1" ]; then
echo "Trying to stop espeakup"
systemctl stop espeakup
echo "Trying to stop espeakup"
systemctl stop espeakup
fi
systemctl start voxinup
}
Expand All @@ -68,8 +68,8 @@ arch_uninstall_connector() {
systemctl stop voxinup
pacman -Q espeakup &> /dev/null
if [ "$?" = "0" ]; then
systemctl enable espeakup
systemctl start espeakup
systemctl enable espeakup
systemctl start espeakup
fi
pacman -R voxinup
}
Expand All @@ -85,14 +85,20 @@ debian_check_libvoxin() {
}

debian_install_connector() {
# apt-get install -y lib32gcc1 libc6-i386 libasound2:i386
apt-get remove -y espeakup
local e=0
set +e
dpkg -V espeakup && apt-get remove -y espeakup
set -e
dpkg -i build/debian/voxinup_*_$ARCH.deb
systemctl enable voxinup
}

debian_uninstall_connector() {
echo TODO
apt-get remove -y voxinup
apt-get install -y espeakup
if [ $? = 0 ]; then
systemctl enable espeakup
fi
}

0 comments on commit d704663

Please sign in to comment.