[docs] Name change forked-daapd -> owntone in FreeBSD scripts
This commit is contained in:
parent
5f1686695a
commit
90ae602bd5
|
@ -2,7 +2,7 @@
|
|||
# Credit thorsteneckel who made the how-to that is the basis for this
|
||||
# script, see https://gist.github.com/thorsteneckel/c0610fb415c8d0486bce
|
||||
|
||||
echo "This script will install forked-daapd in FreeBSD 11.0. The script is not"
|
||||
echo "This script will install OwnTone in FreeBSD 11.0. The script is not"
|
||||
echo "very polished, so you might want to look through it before running it."
|
||||
read -p "Continue? [y/N] " yn
|
||||
if [ "$yn" != "y" ]; then
|
||||
|
@ -32,8 +32,8 @@ if [ "$yn" = "y" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
WORKDIR=~/forked-daapd_build
|
||||
CONFIG=/usr/local/etc/forked-daapd.conf
|
||||
WORKDIR=~/owntone_build
|
||||
CONFIG=/usr/local/etc/owntone.conf
|
||||
read -p "Should the script create $WORKDIR and use it for building? [Y/n] " yn
|
||||
if [ "$yn" = "n" ]; then
|
||||
exit
|
||||
|
@ -69,10 +69,10 @@ CLASSPATH=\$CLASSPATH:/usr/local/share/java/antlr-3.4-complete.jar:/usr/local/sh
|
|||
cd $WORKDIR
|
||||
fi
|
||||
|
||||
read -p "Should the script build forked-daapd? [y/N] " yn
|
||||
read -p "Should the script build owntone? [y/N] " yn
|
||||
if [ "$yn" = "y" ]; then
|
||||
git clone https://github.com/owntone/owntone-server.git
|
||||
cd forked-daapd
|
||||
cd owntone-server
|
||||
|
||||
#Cleanup in case this is a re-run
|
||||
gmake clean
|
||||
|
@ -90,7 +90,7 @@ if [ "$yn" = "y" ]; then
|
|||
export LDFLAGS="-L/usr/local/lib -L/usr/lib"
|
||||
./configure && gmake
|
||||
|
||||
read -p "Should the script install forked-daapd and add service startup scripts? [y/N] " yn
|
||||
read -p "Should the script install owntone and add service startup scripts? [y/N] " yn
|
||||
if [ "$yn" = "y" ]; then
|
||||
if [ -f $CONFIG ]; then
|
||||
echo "Backing up old config file to $CONFIG.bak"
|
||||
|
@ -100,17 +100,17 @@ if [ "$yn" = "y" ]; then
|
|||
|
||||
sudo sed -i -- 's/\/var\/cache/\/usr\/local\/var\/cache/g' $CONFIG
|
||||
# Setup user and startup scripts
|
||||
echo "daapd::::::forked-daapd:/nonexistent:/usr/sbin/nologin:" | sudo adduser -w no -D -f -
|
||||
sudo chown -R daapd:daapd /usr/local/var/cache/forked-daapd
|
||||
echo "owntone::::::owntone:/nonexistent:/usr/sbin/nologin:" | sudo adduser -w no -D -f -
|
||||
sudo chown -R owntone:owntone /usr/local/var/cache/owntone
|
||||
if [ ! -f scripts/freebsd_start_10.1.sh ]; then
|
||||
echo "Could not find FreeBSD startup script"
|
||||
exit
|
||||
fi
|
||||
sudo install -m 755 scripts/freebsd_start_10.1.sh /usr/local/etc/rc.d/forked-daapd
|
||||
sudo install -m 755 scripts/freebsd_start_10.1.sh /usr/local/etc/rc.d/owntone
|
||||
|
||||
service forked-daapd enabled
|
||||
service owntone enabled
|
||||
if [ $? -ne 0 ]; then
|
||||
sudo sh -c 'echo "forked_daapd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
sudo sh -c 'echo "owntone_enable=\"YES\"" >> /etc/rc.conf'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -132,8 +132,8 @@ if [ "$yn" = "y" ]; then
|
|||
sudo service avahi-daemon start
|
||||
fi
|
||||
|
||||
read -p "Should the script (re)start forked-daapd and display the log output? [y/N] " yn
|
||||
read -p "Should the script (re)start owntone and display the log output? [y/N] " yn
|
||||
if [ "$yn" = "y" ]; then
|
||||
sudo service forked-daapd restart
|
||||
tail -f /usr/local/var/log/forked-daapd.log
|
||||
sudo service owntone restart
|
||||
tail -f /usr/local/var/log/owntone.log
|
||||
fi
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: forked-daapd
|
||||
# PROVIDE: owntone
|
||||
# REQUIRE: avahi_daemon dbus
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable `forked-daapd':
|
||||
# Add the following lines to /etc/rc.conf to enable `owntone':
|
||||
#
|
||||
# forked_daapd_enable="YES"
|
||||
# forked_daapd_flags="<set as needed>"
|
||||
# owntone_enable="YES"
|
||||
# owntone_flags="<set as needed>"
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="forked_daapd"
|
||||
name="owntone"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command="/usr/local/sbin/forked-daapd"
|
||||
command_args="-P /var/run/forked-daapd.pid"
|
||||
pidfile="/var/run/forked-daapd.pid"
|
||||
required_files="/usr/local/etc/forked-daapd.conf"
|
||||
command="/usr/local/sbin/owntone"
|
||||
command_args="-P /var/run/owntone.pid"
|
||||
pidfile="/var/run/owntone.pid"
|
||||
required_files="/usr/local/etc/owntone.conf"
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
: ${forked_daapd_enable="NO"}
|
||||
: ${owntone_enable="NO"}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in New Issue