[docs] Name change forked-daapd -> owntone in FreeBSD scripts

This commit is contained in:
ejurgensen 2021-04-09 20:31:51 +02:00
parent 5f1686695a
commit 90ae602bd5
2 changed files with 24 additions and 24 deletions

View File

@ -2,7 +2,7 @@
# Credit thorsteneckel who made the how-to that is the basis for this # Credit thorsteneckel who made the how-to that is the basis for this
# script, see https://gist.github.com/thorsteneckel/c0610fb415c8d0486bce # 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." echo "very polished, so you might want to look through it before running it."
read -p "Continue? [y/N] " yn read -p "Continue? [y/N] " yn
if [ "$yn" != "y" ]; then if [ "$yn" != "y" ]; then
@ -32,8 +32,8 @@ if [ "$yn" = "y" ]; then
fi fi
fi fi
WORKDIR=~/forked-daapd_build WORKDIR=~/owntone_build
CONFIG=/usr/local/etc/forked-daapd.conf CONFIG=/usr/local/etc/owntone.conf
read -p "Should the script create $WORKDIR and use it for building? [Y/n] " yn read -p "Should the script create $WORKDIR and use it for building? [Y/n] " yn
if [ "$yn" = "n" ]; then if [ "$yn" = "n" ]; then
exit exit
@ -69,10 +69,10 @@ CLASSPATH=\$CLASSPATH:/usr/local/share/java/antlr-3.4-complete.jar:/usr/local/sh
cd $WORKDIR cd $WORKDIR
fi 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 if [ "$yn" = "y" ]; then
git clone https://github.com/owntone/owntone-server.git git clone https://github.com/owntone/owntone-server.git
cd forked-daapd cd owntone-server
#Cleanup in case this is a re-run #Cleanup in case this is a re-run
gmake clean gmake clean
@ -90,7 +90,7 @@ if [ "$yn" = "y" ]; then
export LDFLAGS="-L/usr/local/lib -L/usr/lib" export LDFLAGS="-L/usr/local/lib -L/usr/lib"
./configure && gmake ./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 [ "$yn" = "y" ]; then
if [ -f $CONFIG ]; then if [ -f $CONFIG ]; then
echo "Backing up old config file to $CONFIG.bak" 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 sudo sed -i -- 's/\/var\/cache/\/usr\/local\/var\/cache/g' $CONFIG
# Setup user and startup scripts # Setup user and startup scripts
echo "daapd::::::forked-daapd:/nonexistent:/usr/sbin/nologin:" | sudo adduser -w no -D -f - echo "owntone::::::owntone:/nonexistent:/usr/sbin/nologin:" | sudo adduser -w no -D -f -
sudo chown -R daapd:daapd /usr/local/var/cache/forked-daapd sudo chown -R owntone:owntone /usr/local/var/cache/owntone
if [ ! -f scripts/freebsd_start_10.1.sh ]; then if [ ! -f scripts/freebsd_start_10.1.sh ]; then
echo "Could not find FreeBSD startup script" echo "Could not find FreeBSD startup script"
exit exit
fi 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 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
fi fi
@ -132,8 +132,8 @@ if [ "$yn" = "y" ]; then
sudo service avahi-daemon start sudo service avahi-daemon start
fi 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 if [ "$yn" = "y" ]; then
sudo service forked-daapd restart sudo service owntone restart
tail -f /usr/local/var/log/forked-daapd.log tail -f /usr/local/var/log/owntone.log
fi fi

View File

@ -1,25 +1,25 @@
#!/bin/sh #!/bin/sh
# PROVIDE: forked-daapd # PROVIDE: owntone
# REQUIRE: avahi_daemon dbus # 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" # owntone_enable="YES"
# forked_daapd_flags="<set as needed>" # owntone_flags="<set as needed>"
. /etc/rc.subr . /etc/rc.subr
name="forked_daapd" name="owntone"
rcvar=`set_rcvar` rcvar=`set_rcvar`
command="/usr/local/sbin/forked-daapd" command="/usr/local/sbin/owntone"
command_args="-P /var/run/forked-daapd.pid" command_args="-P /var/run/owntone.pid"
pidfile="/var/run/forked-daapd.pid" pidfile="/var/run/owntone.pid"
required_files="/usr/local/etc/forked-daapd.conf" required_files="/usr/local/etc/owntone.conf"
# read configuration and set defaults # read configuration and set defaults
load_rc_config "$name" load_rc_config "$name"
: ${forked_daapd_enable="NO"} : ${owntone_enable="NO"}
run_rc_command "$1" run_rc_command "$1"