Compare commits
3 Commits
62fb997491
...
bf0587a1a5
| Author | SHA1 | Date | |
|---|---|---|---|
| bf0587a1a5 | |||
| 5042af9b45 | |||
| ca05ce080a |
34
installJRMC
34
installJRMC
@@ -18,10 +18,11 @@
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
declare -g SCRIPTVERSION="1.0b10"
|
||||
declare -g SCRIPTVERSION="1.0b11"
|
||||
declare -g OUTPUTDIR="$PWD/output"
|
||||
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
||||
declare -g USER="${SUDO_USER:-$USER}"
|
||||
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
|
||||
|
||||
printHelp() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
@@ -84,7 +85,7 @@ printHelp() {
|
||||
Enable and start a new Xvnc session running JRiver Media Center (system)
|
||||
--vncpass PASSWORD
|
||||
Set vnc password for x11vnc/Xvnc access. If no password is set, the script
|
||||
will either use existing password stored in ~/.vnc/jrmc_passwd or use no password
|
||||
will either use existing password stored in $HOME/.vnc/jrmc_passwd or use no password
|
||||
--display DISPLAY
|
||||
Display to start x11vnc/Xvnc (Default: The current display (x11vnc) or the
|
||||
current display incremented by 1 (Xvnc))
|
||||
@@ -262,7 +263,7 @@ getVersion() {
|
||||
VERSION_SOURCE="webscrape"
|
||||
# Hardcoded
|
||||
else
|
||||
MCVERSION="28.0.100"
|
||||
MCVERSION="28.0.106"
|
||||
VERSION_SOURCE="hardcoded version"
|
||||
err "Warning! Using hardcoded version number"
|
||||
fi
|
||||
@@ -1026,7 +1027,7 @@ service_jriver-xvnc() {
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Type=forking
|
||||
$USER_STRING
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill $NEXT_DISPLAY &>/dev/null || :'
|
||||
ExecStart=$start_cmd
|
||||
@@ -1373,6 +1374,29 @@ getOS() {
|
||||
}
|
||||
|
||||
|
||||
#######################################
|
||||
# Detects if MC is installed on btrfs and disables CoW
|
||||
#######################################
|
||||
disableCoW() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
declare mc_system_path="/usr/lib/jriver"
|
||||
declare mc_user_path
|
||||
mc_user_path=$(getent passwd "$USER" | cut -d: -f6)
|
||||
|
||||
for dir in "$mc_system_path" "$mc_user_path"; do
|
||||
if [[ $(stat -f -c %T "$dir") == "btrfs" ]] &&
|
||||
! lsattr -d "$dir" | cut -f1 -d" " | grep -q C; then
|
||||
echo "Disabling CoW for $dir"
|
||||
sudo chattr -R +C "$dir"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#######################################
|
||||
# Completely uninstalls MC, services, and firewall rules
|
||||
#######################################
|
||||
uninstall() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
@@ -1576,6 +1600,8 @@ main() {
|
||||
done
|
||||
fi
|
||||
|
||||
disableCoW
|
||||
|
||||
# for _container in "${CONTAINERS[@]}"; do
|
||||
# if ! "_container_$_container"; then
|
||||
# if [[ $? -eq 127 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user