Skip to content

Commit

Permalink
Fix scripts permissions on DSM 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPresso committed Dec 20, 2023
1 parent 9393e65 commit 803bbd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions patcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ patch() {

download "$filename.sh" "$repo_base_url/$branch/wrappers/$filename.sh" "$vs_path/bin/$filename"
chown root:VideoStation "$vs_path/bin/$filename"
chmod 750 "$vs_path/bin/$filename"
chmod 755 "$vs_path/bin/$filename"
chmod u+s "$vs_path/bin/$filename"

sed -i -e "s/@package_name@/VideoStation/" "$vs_path/bin/$filename"
Expand All @@ -220,8 +220,7 @@ patch() {

mv -n "$cp_bin_path/$filename" "$cp_bin_path/$filename.orig"
download "$filename.sh" "$repo_base_url/$branch/wrappers/$target.sh" "$cp_bin_path/$filename"
chmod 750 "$cp_bin_path/$filename"
chmod u+s "$cp_bin_path/$filename"
chmod 755 "$cp_bin_path/$filename"

sed -i -e "s/@package_name@/CodecPack/" "$cp_bin_path/$filename"
fi
Expand Down Expand Up @@ -251,6 +250,7 @@ patch() {
mkdir "$cp_base_path/patch"
download "CodecPack's patch_config.sh" "$repo_base_url/$branch/utils/patch_config.sh" "$cp_base_path/patch/patch_config.sh"
download "CodecPack's patch_utils.sh" "$repo_base_url/$branch/utils/patch_utils.sh" "$cp_base_path/patch/patch_utils.sh"
chmod -R 755 "$cp_base_path/patch"

info "Setting CodecPack's ffmpeg version to: ffmpeg$ffmpegversion"
sed -i -e "s/@ffmpeg_version@/ffmpeg$ffmpegversion/" "$cp_base_path/patch/patch_config.sh"
Expand Down Expand Up @@ -286,6 +286,7 @@ patch() {
mkdir "$vs_base_path/patch"
download "VideoStation's patch_config.sh" "$repo_base_url/$branch/utils/patch_config.sh" "$vs_base_path/patch/patch_config.sh"
download "VideoStation's patch_utils.sh" "$repo_base_url/$branch/utils/patch_utils.sh" "$vs_base_path/patch/patch_utils.sh"
chmod -R 755 "$vs_base_path/patch"

info "Setting ffmpeg version to: ffmpeg$ffmpegversion"
sed -i -e "s/@ffmpeg_version@/ffmpeg$ffmpegversion/" "$vs_base_path/patch/patch_config.sh"
Expand Down

0 comments on commit 803bbd0

Please sign in to comment.